How to Place UILabel on UIToolbar

Discussion in 'iPhone' started by AbhishekApple, Aug 30, 2010.

  1. AbhishekApple macrumors member

    Joined:
    Aug 5, 2010
    #1
    I hv already added two BarButton through IB, now i want a label on it

    i tried doing ths
    Code:
    lblPage = [[UILabel alloc] initWithFrame:CGRectMake(163,429, 126, 18)];
    UIBarButtonItem *btnPage = [[UIBarButtonItem alloc] initWithCustomView:lblPage];
    [toolbar setItems:xxxx];
    
    but the toolbar is askn for an Array of objects and i want to add only one item extra apart from the button added from IB.

    Do i have to add all the buttons through code without use of IB.
     

Share This Page