I'm learning Objective C and I'm totally newbie ^^.
I'm making a simple application called BookStore. I have 2 class to store a data:
Book
: to store a data related to book such as (title, author, desc...)Bookstore
: to store books
My application will show all the book title in MasterViewController and when users touch on any of book title, the DetailViewController will show book's details.
This is a code that I use to declare in MasterViewController.h
#import <UIKit/UIKit.h>
#import "Bookstore.h" // This is what I tried to change, I import instead of using @class
@class LKDetailViewController;
//@class Bookstore; // <= This is what's exactly my ebook tell me
@interface LKMasterViewController : UITableViewController
@property (strong, nonatomic) LKDetailViewController *detailViewController;
@property (strong, nonatomic) Bookstore *myBookStore;
@end
So can I use #import instead of @class like this to let the complier know about my Bookstore class? I just wondering which one is be right way?
Thank you so much.