Closed zivl closed 11 years ago
I think this is because of the UIViewController changes. If you create a fresh app I think it'd work as expected.
Thank you for the fast response! Unfortunately, it didn't work on a fresh new app. I might not using it right, have you succeeded doing so? Anyway, it is working only if my ViewController is not including a navigation controller. Here is my code:
SelectContactsViewController *selectContactsVC = [[SelectContactsViewController alloc] init];
UINavigationController *navCtl = [[UINavigationController alloc] initWithRootViewController:selectContactsVC];
[self presentViewController:navCtl animated:YES completion:nil];
EDIT: The "SelectContactsViewController" is the same as "TokenFieldExampleViewController" in the example but a few logic functionality changes
Any suggestions? Thanks a lot!
A temporary workaround that I've implemented is to add a UIToolBar programatically and make it look like a NavigationController. see the following lines in the "viewDidLoad" method of "SelectContactsViewController" class:
float toolBarHeight = NAVIGATION_BAR_HEIGHT + STATUS_BAR_HEIGHT;
UIToolbar *navigationItem = [[UIToolbar alloc] initWithFrame:(CGRect){
self.view.frame.origin, {self.view.frame.size.width, toolBarHeight}
}];
[self.view addSubview:navigationItem];
_tokenFieldView = [[TITokenFieldView alloc] initWithFrame:(CGRect){{self.view.frame.origin.x, self.view.frame.origin.y + navigationItem.frame.size.height}, self.view.frame.size}];
where:
#define STATUS_BAR_HEIGHT 22;
#define NAVIGATION_BAR_HEIGHT 44;
of course it is working for me since my usage of the NavigationController is just for visual purpose of the title and buttons. But if one will need the NavigationController for navigation purposes then he might encounter difficulties.
I'll be happy to any suggestions and ideas, Cheers, Ziv
Hi folks,
Please find the issue in the below image (the screenshot is taken from your latest example app):
I'm still trying to locate the wrong calculation but since you're more familiar with it i guess it will take less for you to fix it.
Thank you for your effort,
Ziv