Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-10-2009, 08:07 PM   #1 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
mr-sk is on a distinguished road
Default Adding an image to a UIToolBar

Hello,

I've looked through UIToolbar Class Reference and I don't see a way to add an image to a UIToolBar - I want to place one in the toolbar like they do in the "NewYorkTimes" application.

Any sample code?

Thanks,
- sk
mr-sk is offline   Reply With Quote
Old 07-10-2009, 09:43 PM   #2 (permalink)
Tutorial Author
 
SimpleSDK's Avatar
 
Join Date: Jul 2009
Location: Orange County, CA
Posts: 25
SimpleSDK is on a distinguished road
Send a message via AIM to SimpleSDK
Default

Quote:
Originally Posted by mr-sk View Post
Hello,

I've looked through UIToolbar Class Reference and I don't see a way to add an image to a UIToolBar - I want to place one in the toolbar like they do in the "NewYorkTimes" application.

Any sample code?

Thanks,
- sk
You could make a UIBarButtonItem and fill it with an image then set the button style to plain and uncheck Enabled.
__________________
-Alec
SimpleSDKŠ
YouTube | Website | Applications
SimpleSDK is offline   Reply With Quote
Old 08-08-2010, 06:20 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: New York
Posts: 7
ajaygautam is on a distinguished road
Default

This just worked for me:

Code:
[topBar insertSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:BAR_BKG_IMG]] autorelease] atIndex:0];
ajaygautam is offline   Reply With Quote
Reply

Bookmarks

Tags
image in uitoolbar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
9 members and 321 guests
chiataytuday, coolman, givensur, ipodphone, jbro, mtl_tech_guy, Punkjumper, vilisei, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,881
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:15 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0