Friday 15 August 2014

ios - what's the difference between custom cell class vs files owner -


In the official developer guide (and other guides), it mentions that you need to set the custom square property IBOutlet Cell to make connections This custom class is an objective class only on @protects with the IPolator marker. I am trying to understand why this custom category property for cell differs from file owners of XIB. Files Leave blank to go and all connections will still work, unless the custom class is set on the cell (I click on the cell and I set custom class by cell "identified inspector"). The only thing I could think of is that a file owner can interact with UI visuals.

ctrl + f "To use the outlet for custom cell content" docs.

I had only one question and used it around something. The custom class attribute applies to each view in your XIB which I can see. Ie If you have a XIB with the UI code that has many UI objects, each may have a separate custom class, a custom class, you have the UIView object in the XIB Must be sub-classes of the original class. For example cell custom class should be UITableViewCell .

On the other hand any class (which I can see) for file owner only one more whole XIB Can be from. As an example in my case, I have the custom UITableViewCell with a custom field and some label XIB I have a header view of a table (i.e. UITableView in the object).

In my case, I made no a custom class for my XIB for I just have the file owner of the cell with my UITableViewController Created (which manages my table view), and the properties in the UITableViewController category are linked to my textfield and label. This works for me because I only have ONE example my custom TableViewCell (headers of the entire table, and only one header).

No comments:

Post a Comment