0

Вопрос по ios5, ios, objective-c – Как использовать пользовательский UINavigationBar

Error: User Rate Limit ExceededUINavigationBar.

@interface MyNavigationBar : UINavigationBar

Error: User Rate Limit ExceededNavigationControllerError: User Rate Limit Exceeded

 _navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
 [_window addSubview:[_navigationController view]];
[self.window makeKeyAndVisible];

Error: User Rate Limit ExceedednavigationControllerError: User Rate Limit ExceededMyNavigationBar

Error: User Rate Limit Exceeded

Благодарю.

  • Error: User Rate Limit Exceeded

    от Streetboy
  • Error: User Rate Limit Exceeded

    от Streetboy
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit ExceededNSLog(@"%@", self.navigationController);Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от Streetboy
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • 1

    Error: User Rate Limit Exceeded

    @property(nonatomic, readonly) UINavigationBar *navigationBar
    

    MyNaviagtionBar *myBar = [[MyNavigationBar alloc] init];
    _navigationController.navigationBar = mybar;
    

    @class MyNavigationBar;
    
    @interface MyNavigationController : UINavigationController
    @property(nonatomic, strong) MyNavigationBar *navigationBar;
    @end
    

    @implementation MyNavigationController
    @synthesize navigationBar = _navigationBar;
    @end
    

    _navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
    

    _navigationController = [[MyNavigationController alloc] initWithRootViewController:self.viewController];
    

  • 4

    Error: User Rate Limit Exceeded

    UINavaigationControllernavigationBarUINavigationBar.

    enter image description here

    @interface UINavigationController (DSCNavigationController)
    
    + (UINavigationController *)dsc_navigationControllerWithRootViewController:(UIViewController *)rootViewController;
    
    @end
    
    @implementation UINavigationController (DSCNavigationController)
    
    + (UINavigationController *)dsc_navigationControllerWithRootViewController:(UIViewController *)rootViewController;
    {
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"DSCNavigationController" owner:nil options:nil];
    
        NSAssert(1 == [topLevelObjects count], @"DSCNavigationController should have one top level object");
    
        UINavigationController *navigationController = [topLevelObjects objectAtIndex:0];
    
        NSAssert([navigationController isKindOfClass:[UINavigationController class]], @"Should have a UINavigationController");
    
        [navigationController pushViewController:rootViewController animated:NO];
    
        return navigationController;
    }
    
    @end
    

    #import "UINavigationController+DSCNavigationController"
    

    MyViewController *myViewController = [[MyViewController  alloc] init];
    UINavigationController *navigationController = [UINavigationController dsc_navigationControllerWithRootViewController:myViewController];