Search code examples
iphoneipaduinavigationbar

How to Move text on navigation bar


Hi I have to move the text on navigation bar..I don't have any idea about scrolling text. Is anybody have idea about this please let me know.

Thanks


Solution

  • ADD this files in to your project and import it in to your class then add the following command in your view did load.I hope You are using a navigation based template for your application.

    http://blog.stormyprods.com/2009/10/simple-scrolling-uilabel-for-iphone.html

    and then in viewdidload

    AutoScrollLabel *autoScrollLabel=[[AutoScrollLabel alloc] initWithFrame:CGRectMake(10, 15, 320, 16)];
    autoScrollLabel.text = @"Hi Mom!  How are you?  I really ought to write more often.";
    autoScrollLabel.textColor = [UIColor whiteColor];
    //self.title = @"Resources";
    //self.title = @"%@"autoScrollLabel;
    [self.navigationController.navigationBar addSubview:autoScrollLabel];