Closed peterjkirby closed 9 years ago
Hi, Peter!
Yes, known issue ) One day I’ll fix it ) Now you’d better to leave refresh control title empty..
Nick.
On 03 апр. 2014 г., at 23:02, Peter Kirby notifications@github.com wrote:
I have a a bottomRefreshControl setup as follows:
UIRefreshControl *refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(refresh)
forControlEvents:UIControlEventValueChanged]; refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Pull to Refresh"]; self.tableView.bottomRefreshControl = bottomRefreshControl; The text "Pull to Refresh" is rotation 180 degrees and is also position on the top side of the refresh indicator.When the following line is added, the problem is sort of fixed (the attributedTitle is correctly positioned, but the refresh indicator is now upside down). refreshControl.transform = CGAffineTransformMakeRotation(M_PI);
— Reply to this email directly or view it on GitHub.
Hello. What about fix ?
Fixed in version 0.4.4
I have a a bottomRefreshControl setup as follows:
The text "Pull to Refresh" is rotation 180 degrees and is also position on the top side of the refresh indicator.
When the following line is added, the problem is sort of fixed (the attributedTitle is correctly positioned, but the refresh indicator is now upside down):
One potentially extreme hack that fixes this is to add a second transformation to the above code, that will apply a second transformation to the refreshControl subview that contains the refresh indicator, as follows:
This will fix the position and orientation of the refreshControl's attributedTitle, keep it's positioning correct relative to the table view, and keep the indicator in the appropriate orientation.
I don't recommend using the above code, however, unless it is known for certain that the UIRefreshControl view won't be changing anytime. There is probably also a better way of searching through the UIRefreshControl's subviews. The above code was just my first attempt at figuring out what the inside's of UIRefreshControl looked like.