enormego / EGOTableViewPullRefresh

A similar control to the pull down to refresh control created by atebits in Tweetie 2.
http://developers.enormego.com
3.26k stars 878 forks source link

iOS 5 must be __unsafe_unretained #34

Closed stephenlindauer closed 13 years ago

stephenlindauer commented 13 years ago

I brought the code into my project which is sdk 5. I got rid of the obvious errors complaining about the "release" errors, but the last one I can't figure out. I'm getting "Existing ivar '_delegate' for unsafe_unretained property 'delegate' must be __unsafe_unretained"

I've tried every combination I could think of within the EGORefreshTableHeaderView.h; adding __unsafe_unretained, removing assign, etc... Has someone done this yet? I'm sure it's a fairly easy change, I'm just new to coding for iPhone and can't figure it out.

devindoty commented 13 years ago

If you're compiling under ARC, you can remove the delegate var in the interface. Should look like below.

@interface EGORefreshTableHeaderView : UIView { EGOPullRefreshState _state;

UILabel *_lastUpdatedLabel;
UILabel *_statusLabel;
CALayer *_arrowImage;
UIActivityIndicatorView *_activityView;

}

@property(nonatomic,assign) id delegate;