Thursday, 8 August 2013

UIPickerView Changing UIButton Title Size

UIPickerView Changing UIButton Title Size

So I'm making Alarm Clock to test my skills but can't seem to figure this
out... What I've got a UIPickerView that gives a user a time that they can
select. Once the time is selected the titleLabel on a UIButton is supposed
to update with the time they selected and it does, but it shrinks the new
time so it's unreadable... Is there something that needs adjusted with the
formatting?
Before when my page loads Here's my code
- (NSDate *)dateFromString:(NSString *)string {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"HH:mm"];
NSDate *date = [[NSDate alloc] init];
date = [formatter dateFromString:@"15:00"];
assert(date != nil); // Error converting string to date
return date;
}
After when a user has set a time
Any reason why it might be doing this?

No comments:

Post a Comment