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 11-23-2011, 11:03 AM   #1 (permalink)
New To iOS
 
Join Date: Nov 2011
Location: Waterloo, ON
Age: 20
Posts: 187
RileyE is on a distinguished road
Default Calculate Frame Size

Hi,

Is there a way to calculate the size of a frame? I am looking for a general solution, so that I can learn how to deal with this in future, but specifically, I want my PickerView to span the entire screen and have the components fill the entire view.

The only problem is that I have to take the size of the frame into consideration. By estimation, it seems as though the frame (in this instance) is around 30 pixels, but is there a way to determine the frame size of a UIFrameWork programmatically?

What I am trying to do is make the component width the (screen_width / num_of_components - frame_width / num_of_components). Is there a better way to do this, or is there a way to calculate frame_width (of the framework, which happens to be UIPickerView)?

Riley
RileyE is offline   Reply With Quote
Old 11-23-2011, 11:31 AM   #2 (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

??

view.frame.size.width
view.frame.size.height
rocotilos is offline   Reply With Quote
Old 11-23-2011, 11:51 AM   #3 (permalink)
New To iOS
 
Join Date: Nov 2011
Location: Waterloo, ON
Age: 20
Posts: 187
RileyE is on a distinguished road
Default

Quote:
Originally Posted by rocotilos View Post
??

view.frame.size.width
view.frame.size.height
By the frame size, I meant the actual frame of the UI. What that gives is the size of the entire view. I just want the border/frame.

Actually, the frame seems to be about 24 pixels wide at its minimum width, for the UIPickerView.

Last edited by RileyE; 11-23-2011 at 11:56 AM.
RileyE is offline   Reply With Quote
Reply

Bookmarks

Tags
calculate, frame, frame size, frameworks, uipickerview

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: 402
14 members and 388 guests
7twenty7, chiataytuday, Clouds, dedeys78, Duncan C, e2applets, EvilElf, iekei, ipodphone, leostc, Murphy, QuantumDoja, sacha1996, Sami Gh
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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