ios - IBOutlets strong or weak -
this question has answer here:
- should iboutlets strong or weak under arc? 11 answers
outlets can created this
@interface searchviewcontroller : uiviewcontroller<uisearchbardelegate> { iboutlet uiview *viewsearchbar; iboutlet uiscrollview *scrollvieww; iboutlet uilabel *lblname; } and this
@interface searchviewcontroller : uiviewcontroller<uisearchbardelegate> { } @property(nonatomic, weak) iboutlet uiscrollview *scrollvieww; @property(nonatomic, weak) iboutlet uiview *viewsearchbar; @property(nonatomic, weak) iboutlet uilabel *lblname; @end i know nonatomic/atomic strong/weak in arc, in first example they? strong, weak, nonatomic or atomic.
please explain or link me detail.
instance variables under arc strong default. , neither atomic nor nonatomic, since instance variables , not accessor methods. atomic/nonatomic flags related multi threading. specify whether or not accessor methods should atomic. when accessor atomic, execution can't change other thread in middle of accessor method. when it's nonatomic, there no such restriction.
note: iboutlet typedef of nothing. it's flag interface builder , has no memory related functions.
Comments
Post a Comment