ios - Set Navigation Title Text -


i have uicollectionviewcontroller , trying set navigation title.. none of these works...it not show text!

self.titlelabel = [[uilabel alloc] initwithframe:cgrectzero]; self.titlelabel.backgroundcolor = [uicolor clearcolor]; self.titlelabel.font = [uifont fontwithname:@"arialhebrew-bold" size:15]; self.titlelabel.shadowcolor = [uicolor colorwithwhite:0.0 alpha:0.5]; self.titlelabel.textalignment = nstextalignmentcenter; self.titlelabel.textcolor = [uicolor whitecolor]; self.titlelabel.text = [self.navigationitem title]; self.navigationitem.titleview = self.titlelabel; [self.titlelabel settext:@"title"];  self.navigationitem.title = @"the title"; 

make frame of new label bigger. height of nav bar fixed @ 44 pixels.

for example: cgrectmake(100,0,120,44);

the width , origins depend on else on navbar, , width of navbar.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -