soffes / SSPullToRefresh

Simple and highly customizable pull to refresh view
MIT License
885 stars 139 forks source link

initWithScrollView:delegate: should call initWithFrame: on super, not self #60

Closed vadim-fueled closed 9 years ago

vadim-fueled commented 9 years ago

Since initWithScrollView:delegate: is a de-facto designated initializer it should call designated initializer of superclass with super, not self Explicitly stating that it's a designated initializer with NS_DESIGNATED_INITIALIZER would be nice.

vadim-fueled commented 9 years ago

Did this not result in a warning at https://github.com/soffes/sspulltorefresh/blob/3ee6473e1f35c8c1eab8c28c933592141a8a9759/SSPullToRefresh/SSPullToRefreshView.m#L161 which is my original complaint? The thing is I can't subclass SSPullToRefreshView in Swift without overriding init(frame:) which is odd.

soffes commented 9 years ago

Fixed that in 68ac0ee1febdf1e514b128f2c6cd05848fa66828