UIDynamicItem should know its behaviors

Originator:robnapier
Number:rdar://15054302 Date Originated:23-Sep-2013 10:23 AM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:
 
Currently, <UIDynamicItem> does not know what behaviors it belongs to. This makes it very complicated to add and remove items. Specifically, it is difficult to remove a UIView because you must also keep track of all the behaviors that the UIView may be part of. Since these behaviors may be added at various places in the code, this makes it difficult to maintain separation of concerns.

<UIDynamicItem> should include the following methods:

@property (readonly) NSArray *behaviors;
- (void)addBehavior:(UIDynamicBehavior *)behavior;
- (void)removeBehavior:(UIDynamicBehavior *)behavior;
- (void)removeAllBehaviors;

Ideally these should be @required.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!