मुझे आश्चर्य है कि दो बार @interface
क्यों है। class.h
में और class.m
में से एक।@ कार्यान्वयन के ऊपर @interface क्यों है?
TestTableViewController.h
: उदाहरण के लिए:
#import <UIKit/UIKit.h>
@interface TestTableViewController : UITableViewController
@end
और (स्वचालित रूप से उत्पन्न) class.m
मैं लगता है:
#import "TestTableViewController.h"
@interface TestTableViewController()
@end
@implementation TestTableViewController
... methods delegated from UITable delegates
@end
तो मेरे सवाल है, क्या .m
फ़ाइल में @interface TestTableViewController()
बारे में है। यह क्यों है क्या मुझे इसकी ज़रूरत है?
अग्रिम
संभावित डुप्लिकेट [.h और .m फ़ाइल में \ @interface परिभाषा के बीच अंतर] (http://stackoverflow.com/questions/3967187/difference-between-interface-definition-in-h-and-m- फ़ाइल), [आईओएस 5 परियोजनाओं में उपयोग की जाने वाली .m फ़ाइलों में \ @interface घोषणा क्या है?] (http://stackoverflow.com/questions/9751057/what-is-the-interface-declaration-in-m- फाइल-प्रयुक्त-इन-आईओएस -5-प्रोजेक्ट्स), [* .h और * .m फ़ाइलों में दो इंटरफेस] (http://stackoverflow.com/questions/9590917) [कार्यान्वयन फ़ाइल के अंदर इंटरफ़ेस घोषित करें (उद्देश्य- सी)] (http://stackoverflow.com/questions/10647913/) –