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

View Single Post
Old 03-13-2010, 10:02 AM   #4 (permalink)
Scenario
Registered Member
 
Join Date: Jul 2008
Posts: 13
Scenario is on a distinguished road
Default

Well the trick is to use a UIButton with an image:

Code:
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
	[button setImage:[UIImage imageNamed:@"RefreshIcon.png"] forState:UIControlStateNormal];
	[button setImage:[UIImage imageNamed:@"RefreshIcon.png"] forState:UIControlStateHighlighted];
	button.imageEdgeInsets = UIEdgeInsetsMake(0, -16, 0, 0);
	[button addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventTouchUpInside];
	addressBar.rightView = button;
	addressBar.rightViewMode = UITextFieldViewModeAlways;
Scenario is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,539
Threads: 94,055
Posts: 402,657
Top Poster: BrianSlick (7,984)
Welcome to our newest member, cecilytw61
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:17 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.