Also, I noticed you are using customTitleView property in setting the navigation item. I don't think that is still available in SDK5, so use the titleView property.
Make sure, you don't have any warnings. Objective C is dynamically typed, so it's better to
TREAT WARNINGS AS ERRORS.
I`m using this code to customize title view, its work for me, if you have problem I sugest that try to localize title view in stack of items.. in my case it`s working because topItem is the title view...
I`m using this code to customize title view, its work for me, if you have problem I sugest that try to localize title view in stack of items.. in my case it`s working because topItem is the title view...
I`m using this code to customize title view, its work for me, if you have problem I sugest that try to localize title view in stack of items.. in my case it`s working because topItem is the title view...
Replies
UILabel *bigLabel = [[UILabel alloc] init];
bigLabel.text = @I am BIG;
bigLabel.font = [UIFont fontWithName:@Arial size: 22.0];
self.navigationItem.customTitleView = bigLabel;
[bigLabel release];
Maybe, the font name is not a valid one,
test it with code below
Also, I noticed you are using customTitleView property in setting the navigation item. I don't think that is still available in SDK5, so use the titleView property.
Make sure, you don't have any warnings. Objective C is dynamically typed, so it's better to
TREAT WARNINGS AS ERRORS.
UILabel *myTitle = [[UILabel alloc] init];
myTitle.text = @This is my title;
self.navigationItem.titleView = myTitle;
[myTitle release];
but it doesn't show anything, what's wrong?
The docs for the UINavigationItem titleView property say that if the nav item's left button is non-nil, the custom title view is not displayed:
So if you have a left button (such as the default "back" button), it's probably ignored.
Insert in loadview..
Works exactly as required! Thanks for this
It was crashing for me, unless I changed the following line: to:
Then it works! Thanks!
<a href="http://www.maluspumila.net" target="_blank">http://www.maluspumila.net</a><br />
<br />
God's Bible - <a href="http://www.maluspumila.net/Gods_Bible_-_The_iPhone_Bible_Application/Welcome.html" target="_blank">http://ww
You just missed one thing - to size the view. This can be done either with the initWithFrame intialiser, or by calling sizeToFit like this:
<a href="http://itunes.apple.com/us/app/fuel-monitor/id410088611?mt=8" target="_blank">My 2nd app</a>
How do I set the label in the above code to show no background? With the above code the label has a white background.
Thanks
ok so I used bigLabel.backgroundColor = [UIColor blueColor]; and that changes the color but how do I set it to show without a background?
<br />
<a href="http://cupsofcocoa.wordpress.com/" target="_blank">
fixed it! used "clearColor"
VLW PELA AJUDA AQUELE ABRA
Hello,
How would I change the font size without changing the font?
Regards