By adding this line, it will detect the properties mentioned in the Product.h file. You can create an instance in Objective C in 3 different ways:Īdd the line #import "Product.h" in main.m file. Here we will be creating instance(object) of the Product class. (void)setProductName:(NSString *)prodName Return _productID // retrieving the value of the property _productID = productID // assigning the value of NewName to the original property Here we will be assigning the value of NewName to that of the original property name and also retrieving the property values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |