UIButton issue in ios7.1/xcode5.1
UIButton issue in ios7.1/xcode5.1
- Subject: UIButton issue in ios7.1/xcode5.1
- From: David Brittain <email@hidden>
- Date: Thu, 20 Mar 2014 12:19:24 -0700
I am seeing an issue in our app where setTitle:forState: is not
working when a UIButton is in the selected state (the same happens
with setImage:forState:). Specifically I am calling:
[self.button setTitle:@"New name" forState:UIControlStateNormal];
The call has no effect until the user taps the button. So, it seems
that it is not being redrawn.
This only happens in iOS7.1; iOS 7.0 and earlier is fine. It also only
seems to happen when the app is built with Xcode 5.1, I don't have 5.0
any more so can't test this directly. But our live app works fine and
it was built with 5.0, also others have reported the same thing...
(https://devforums.apple.com/message/950802#950802
https://devforums.apple.com/message/951921#951921)
The documentation states "At a minimum, you should set the value for
the normal state. If a title is not specified for a state, the default
behavior is to use the title associated with the UIControlStateNormal
state"
Therefore, I would not expect to have to set state for UIControlStateSelected.
So, a few questions:
- am I correct that I should not have to call [self.button
setTitle:@"New name" forState:UIControlStateSelected];
- any suggestions for workarounds?
- any ideas how this could happen when building with xcode 5.1 but not
xcode 5.0?
Thanks
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden