My app has a badge on right bar button item, custom badge ,when orientation changes badge goes to middle of the navigation bar
portrait
landscape:
-(void)viewDidAppear:(BOOL)animated
{
_customBadge1 = [CustomBadge customBadgeWithString:@"2"
withStringColor:[UIColor whiteColor]
withInsetColor:[UIColor redColor]
withBadgeFrame:YES
withBadgeFrameColor:[UIColor whiteColor]
withScale:1.0
withShining:YES];
// Set Position of Badge
CGRect frameimgback2 = CGRectMake(742, 0, 20, 20);
_customBadge1.frame=frameimgback2;
[self.navigationController.navigationBar addSubview:_customBadge1];
}
How can I stable this badge that will always stay in the same postion (on right upper side of right bar button.) ?
Thanks,