Вопрос по objective-c, ios – Должны ли IBOutlets быть иварами или свойствами?

6

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

  1. ivar only
  2. property only
  3. property backed with an ivar

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Ваш Ответ

2   ответа
1

1

Error: User Rate Limit ExceededIBOutletError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

//.h (ARC)
@property (nonatomic, weak) IBOutlet UILabel* myLabel;

//.h (non-ARC)
@property (nonatomic, retain) IBOutlet UILabel* myLabel;

//.m
@synthesize myLabel;

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededinitError: User Rate Limit ExceededdeallocError: User Rate Limit Exceeded

// (non-ARC)
- (void)dealloc
{
   [myLabel release]; myLabel = nil; // I'm using the instance variable here!
   [super dealloc];       
}

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded Undistraction
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы