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 08-02-2008, 04:23 PM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 33
obrand is on a distinguished road
Default UIPickerView custom size??

Great tutorial!! I was just wondering , if possible, how to have a custom size for the PickerView? Its has some attributes that allows to set width and height, but these have no effect...
Is it because the PickerView gets the size of its superview?

Help would be great!!

Thanks
obrand is offline   Reply With Quote
Old 08-02-2008, 04:43 PM   #2 (permalink)
Tutorial Author
 
Join Date: May 2008
Posts: 315
myersn024 is an unknown quantity at this point
Default

it is my understanding that pickers are the size they are and you cannot change them.
myersn024 is offline   Reply With Quote
Old 10-20-2009, 07:13 AM   #3 (permalink)
Registered Member
 
gblank's Avatar
 
Join Date: Oct 2008
Location: Netherlands
Posts: 35
gblank is on a distinguished road
Send a message via Skype™ to gblank
Default

Quote:
Originally Posted by myersn024 View Post
it is my understanding that pickers are the size they are and you cannot change them.
amm, no they are not.
you can resize the uipickerview by doing this :
myuipickerview.frame = CGRectMake(.....);
that's it.
for some reason initwithframe does not work on it.
gblank is offline   Reply With Quote
Old 11-22-2009, 06:07 AM   #4 (permalink)
almostfunnydev
iPhone Dev SDK Supporter
 
rocotilos's Avatar
 
Join Date: Oct 2009
Age: 34
Posts: 3,015
rocotilos is on a distinguished road
Default

Quote:
Originally Posted by gblank View Post
amm, no they are not.
you can resize the uipickerview by doing this :
myuipickerview.frame = CGRectMake(.....);
that's it.
for some reason initwithframe does not work on it.
Hi, i tried to resize the UIPickerView too. But how come after resizing, the borders of it looks messed up?

and 2nd Q: is it legal to do so?

Thanks.

UPDATE:
I found some ways to change the size thru editing the .xib in text editor too. But result is same, the border became messed up too.

Last edited by rocotilos; 11-22-2009 at 07:32 AM.
rocotilos is offline   Reply With Quote
Old 08-03-2011, 10:27 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 1
Wingle is on a distinguished road
Default

Quote:
Originally Posted by gblank View Post
amm, no they are not.
you can resize the uipickerview by doing this :
myuipickerview.frame = CGRectMake(.....);
that's it.
for some reason initwithframe does not work on it.
HI,gblank....I am a newbird here.

The method myuipickerview.frame = CGRectMake(.....) I have tried a couple times , but it didn`t work. I don`t know what`s wrong.
Here is my code , and Can you help me?
Code:
UIPickerView *picker=[[UIPickerView alloc] init];
picker.frame= CGRectMake(0, 219, len*13.3, 216);
picker.delegate=self;
picker.dataSource=self;
picker.showsSelectionIndicator = YES;
m_job.inputView=picker;   //m_job is a UITextFiled instance
[picker release];

Last edited by Wingle; 08-03-2011 at 10:31 AM.
Wingle is offline   Reply With Quote
Old 12-02-2011, 02:03 PM   #6 (permalink)
Registered Member
 
Join Date: Apr 2011
Location: California
Posts: 225
KarlJay is on a distinguished road
Default

Quote:
Originally Posted by Wingle View Post
HI,gblank....I am a newbird here.

The method myuipickerview.frame = CGRectMake(.....) I have tried a couple times , but it didn`t work. I don`t know what`s wrong.
Here is my code , and Can you help me?
Code:
UIPickerView *picker=[[UIPickerView alloc] init];
picker.frame= CGRectMake(0, 219, len*13.3, 216);
picker.delegate=self;
picker.dataSource=self;
picker.showsSelectionIndicator = YES;
m_job.inputView=picker;   //m_job is a UITextFiled instance
[picker release];
Looked ALL OVER for this answer!

Big Thanks!
KarlJay is offline   Reply With Quote
Reply

Bookmarks

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: 334
8 members and 326 guests
chiataytuday, 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:13 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0