|Jul 3, 2013, 02:12 PM||#1|
Funny behavior of ImageView
I have an ImageView in my application.
When I load an image into my ImageView I change the size of it with the SetFrame command, and that seems to work okay.
I make the ImageView bigger.
On my window form I also go a NSPopupButton and when I click on it my ImageView set its frame to the starting value. Its going back the the size it has when I start my application.
I have tried many things but I can figure out why it shrinks my ImageView back.
Does any one here know why is is like that?
|Jul 4, 2013, 09:59 AM||#2|
I have tried to set breakpoints on every line that includes the setFrame command, but no code gets called when I click in my NSPopUpButton.
I really hope that someone can help me.
|Jul 4, 2013, 12:27 PM||#3|
If you used Interface Builder (IB) and the button is a part of that construction, then select the button in IB and check the connections panel. Is the button connected to any outlet or action. If connected to an action, place a break point on the first line of the method. If not an action, but an outlet, check all references to the outlet (instance variable) and see if you are assigning a action to it.
If the above doesn't reveal anything, then try turning off AutoLayout for that IB view. I mention this as a shot in the dark.
You may need to post some code or screen shots for people to help further.
That's all I have.
My App: CameraTime - Time lapse photography for novice and advanced users.
|Jul 4, 2013, 02:05 PM||#4|
Sadly the Autolayout idea did not work.
This is the code for the action for the popupbutton.
[ivTemporyImageAA setFrame:bigScreenshot]; NSLog(@"height=%f", ivTemporyImageAA.frame.size.height); NSLog(@"widht=%f", ivTemporyImageAA.frame.size.width);
This is how I set the sized in applicationDidFinishLoading.
smallIcon = NSMakeRect(262, 257, 100, 100); bigScreenshot = NSMakeRect(262, 98, 155, 259);
Then when I select a value in my popupbutton and called the previous code the ImageView gets small again. Ignoring the code in the action.
The nslog show the right values, but something after the nslog code resize the ImageView back to the small size.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|UICollisionBehaviour - UIView, contains round ImageView-collision on subview boundary||gwelmarten||iPhone/iPad Programming||0||May 17, 2014 07:46 AM|
|Adjusting Collections View to ImageView (Width & Height)||loon3y||iPhone/iPad Programming||1||Jul 10, 2013 10:05 AM|
|How do I add effects to a NSImage or an ImageView||Trisect Develop||Mac Programming||2||Jul 8, 2013 03:54 AM|
|NSTableViewCell.ImageView Setting Position?||Fritzables||Mac Programming||0||Feb 23, 2013 04:54 AM|
|ImageView Help||camitampa||iPhone/iPad Programming||6||Sep 17, 2012 08:45 PM|
All times are GMT -5. The time now is 04:45 PM.