 |
 |
|
 |
11-06-2009, 02:55 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Sep 2009
Posts: 13
|
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?
|
|
|
11-09-2009, 06:13 AM
|
#2 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: Pune, India
Posts: 311
|
Quote:
Originally Posted by monty747
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
|
|
|
11-10-2009, 03:10 PM
|
#3 (permalink)
|
|
Humbled Student
iPhone Dev SDK Supporter
Join Date: Apr 2009
Location: Long Island, NY
Age: 30
Posts: 866
|
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.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 311 |
| 29 members and 282 guests |
| arielz, bensj, BrianSlick, carendt242, Chilibird, chorew, doing_my_best, ebender001, georgeburns, harkonian, Hololont, iBud, iTrackiGiveaway, jaime1988, jamison, JasonR, jbro, jj10, john3478, LemonMeringue, odiggity, pion, rjgrune, scotopia, stlau, suachuasua, walkman2001, _nivek |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,318
Threads: 39,113
Posts: 171,503
Top Poster: smasher (2,576)
|
| Welcome to our newest member, lerner274 |
|