Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.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-06-2009, 02:55 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 13
Default Making programatic changes to UIImageView Width/Height

How do I programatically make changes to the width/height of a UIImageView? This would be a single instance of the view but would have different sizes depending on which button the user selects on-screen. I can get it to display the first time with the place and size I want but then it needs to change size and I'm not finding a way to access width/height numbers without doing a CGRectMake again. I already initialized it so doing it a second time would create a second view in addition to the first. I guess I'm looking for a:

myImageView.w = 10;
myImageView.h = 20;

type deal. Any thoughts?
monty747 is offline   Reply With Quote
Old 11-09-2009, 06:13 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Pune, India
Posts: 311
Send a message via Skype™ to Akshay Shah
Cool

Quote:
Originally Posted by monty747 View Post
How do I programatically make changes to the width/height of a UIImageView? This would be a single instance of the view but would have different sizes depending on which button the user selects on-screen. I can get it to display the first time with the place and size I want but then it needs to change size and I'm not finding a way to access width/height numbers without doing a CGRectMake again. I already initialized it so doing it a second time would create a second view in addition to the first. I guess I'm looking for a:

myImageView.w = 10;
myImageView.h = 20;

type deal. Any thoughts?

You need to set a complete frame of the imageView.
For the above values it will be done as
Code:
[myImageView setFrame:CGRectMake(myImageView.frame.origin.x, 
myImageView.frame.origin.y,10,20)];
Hope this helps...

Regards,
Akshay Shah.
__________________
If you think I did help you, you can always thank me by buying
iHoldMore - A very nice and addictive game...

Need a mobile app. Contact Us.
Ruby Solutions Pvt. Ltd.
You can mail me at akshay@ruby-solutions.com
Akshay Shah is offline   Reply With Quote
Old 11-10-2009, 03:10 PM   #3 (permalink)
Humbled Student
iPhone Dev SDK Supporter
 
Dutch's Avatar
 
Join Date: Apr 2009
Location: Long Island, NY
Age: 30
Posts: 866
Send a message via AIM to Dutch
Default

I really hate it when people ask questions that have answers that are SO easily findable by reading the most basic of apple's documentation... They register for a user account, they ask the question, make it OBVIOUS they are too lazy to read page one of anything, they get their answer and they are never heard from again.

Akshay, you are a better man than I - I would not have answered this absurdity.
__________________
My Facebook

Contact me if you want a generous discount on either
of these products.
My way of saying thank you.

PinkNotes Plus® Business IM Software
AnswerChat® Live Website Support Chat


<---- If I helped you out, click the badge icon under my name to add to my rep. Thanks.
Dutch 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


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,318
Threads: 39,113
Posts: 171,503
Top Poster: smasher (2,576)
Welcome to our newest member, lerner274
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:43 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0