Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timer in uinavigationbar #37

Open
c-villain opened this issue Jan 3, 2015 · 1 comment
Open

timer in uinavigationbar #37

c-villain opened this issue Jan 3, 2015 · 1 comment

Comments

@c-villain
Copy link

i'd like to insert label with timer in nav bar viz. in rightBarButtonItem. There is the code:

UILabel _label = [[UILabel alloc]initWithFrame:CGRectMake(0.0, 0.0, 40.0, 100.0)];
lblTimer = [[MZTimerLabel alloc] initWithLabel:label andTimerType:MZTimerLabelTypeTimer];
[lblTimer setCountDownTime:21_60];
lblTimer.bounds = CGRectOffset(label.bounds, 0, 0);
lblTimer.font = FONT_B(18.0f);
lblTimer.textColor = [UIColor whiteColor];
[lblTimer sizeToFit];
lblTimer.delegate = self;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:lblTimer];
[lblTimer start];

The result: in nav bar appears timer label with 00:00:00 (NOT 00:21:60) and timer is not starting... What am i do wrong? thanks for answering. With last holidays!=)

@mineschan
Copy link
Owner

Hi Alexander,

I will check later! Happy holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants