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 > Mac OS X Development Forums > Objective-C, Python, Ruby Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-26-2009, 11:12 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 4
Nicsoft is on a distinguished road
Question How to get and change the height and width in UIView

Hello,

I am trying to learn how to creat iphone apps, hence, new to this. I am using both Interface Builder and of course Xcode.

There are a couple of things I would like to find out how to do, have searched but could find any helpful info.

1. I would like to find out the height and width of my UIView that I am using. I tried this but all it spits out is '0', which of cours can't be true.

self.bounds.size.width

I am trying to find out the width (and height) in the drawRect function of my UIView class that is connected to the view in Interface Builder.

It seems like the coordinates defined in Interface Builder is not the same as it turns out in the application (due to images of a known size does not fit within the view, even though it should...).

2. I would like to set the coordinates in order to make sure I know what I have to work with. How?

3. In Interface Builder, it is possible to set the status bar to "none", but when launching the application in the simulator it's still visible, how come?

4. By setting the coordinates myself, does it help out making the application look correctly scaled in other iPhone devices with different resolution?

Thank you in advance!

/Niklas
Nicsoft 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: 463
12 members and 451 guests
Domele, Duncan C, Feldspar, MacBook MH, Objective Zero, patapple, peterwilli, pipposanta, Punkjumper, SLIC, taylor202, Today's Posts
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,694
Threads: 94,137
Posts: 402,950
Top Poster: BrianSlick (7,990)
Welcome to our newest member, peterwilli
Powered by vBadvanced CMPS v3.1.0

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