PullToRefresh icon indicating copy to clipboard operation
PullToRefresh copied to clipboard

ARC support

Open kalys opened this issue 12 years ago • 0 comments

Hello.

Now the library doesn't support ARC. As far as I know there are 2 options to solve this.

The first is adding -fno-objc-arc compiler flag for PullRefreshTableViewController.m file in build phases tab of target configs (as described here).

The second solution doesn't need any steps for developers. I found it in ViewDeck library. Here you can find changes.

Pay attention to the next lines of code.

#ifndef __has_feature
#define __has_feature(x) 0
#endif
#ifndef __has_extension
#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
#endif

#if __has_feature(objc_arc) && __clang_major__ >= 3
#define II_ARC_ENABLED 1
#endif // __has_feature(objc_arc)

and

- (void)dealloc {
#if !II_ARC_ENABLED
    [refreshHeaderView release];
    [refreshLabel release];
    [refreshArrow release];
    [refreshSpinner release];
    [textPull release];
    [textRelease release];
    [textLoading release];
    [super dealloc];
#endif
}

So the question is which way is correct? And should I pull-request this changes?

kalys avatar Jun 30 '12 17:06 kalys