I have added the UIImageview to the viewcontroller which was presented modally,my problem was when i rotate the device imageview disappearing.I am facing this problem in iPad when rotated in all orientation,but some time can able view the image.I was wondering with this issue.
Any help would be appreciated.
Thanks in advance .
It could have to do with Autolayout. Ensure that you have your constraints set properly. I.e. maybe set the distance of the top position to the superview and the leading position to the superview properly.
Related
I have a weird issue which I'm sure someone can help fix easily. I have a UIImageView within a UIScrollview which I'm able to scroll up to the top. I have paging enabled and it's working as expected except for one problem. After I scroll the image all the way to the top and it snaps, as soon as I touch anywhere in the UIScrollView, it automatically scrolls the UIImageView back down. Any ideas on how to prevent this?
Thanks!
Fixed the issue by playing with the UIScrollview's content size.
I'm new in Iphone. I have an UITextView inside a UIImageView . Now I need to dynamically resize the UIImageView so that its textview also change its size dynamically. Moreover I can move this UIImageView with UITextView around the screen. If any one knows this using UIGuesture please help me.
Any help would be appreciated
If you are looking at resizing the UIImageView object, look at the UIPinchGestureRecognizer. It will have a property called scale that you can use to change its size.
As for the UITextView object that is the subview, you can look at autoresizingMask property inherited from UIView. Set it appropriately so that the text view scales in response to its super view.
For moving the image view, you can use the UIPanGestureRecognizer. You can get the translation using translationInView:. Use this to modify the center of the image view object. This should move the image view as you drag your finger around.
I hope you've gone through the guide. Let us know if you face problems implementing this and put some code so that we can guide you in the right direction.
resizing images inside UIScrollView when rotating the iphone.
I have a series of images placed on the UIScrollView (some images are placed one on top of the other). When I rotate the scrollview at some page, the topmost image on the hierarchy is expected to rotate which happens but the image goes to the first page of the scrollView. Any help on what could be going wrong would be appreciated.
thanks
DKV
I think the imageView which is misbehaving w.r.t to its frame is not added into correct super view. I think you should check that all imageView are added onto scrollView (if you want to show one imageView above another imageView make frame of both the imageView same, avoid adding one imageView onto another imageView).
First,I am sorry for my poor english...
So, i have a problem with a view which is added on a other one.
I am setting size of UIview in IB as 200px/200px
I set the center of this view with the center of parent view.
Everything is working great at this point.
I can see my View in the center of the parent view like i want.
Then I set the - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
And that's working to.
But when i rotate the iphone, the size of the view change to full size, the view don't want to stay in center and go on the top left of the screen and resize as fullscreen...
Can somebody help me with this problem ?
Do I have to set the frame and the center after rotate ? That can't be automatic ?
Thank you!
In IB, under the "Autosizing" section, remove the "arrow" that indicates auto width/height of your component.
I've got a UISlider in my main view, but it doesn't receive touches at the right end. I thought it could be a pesky view covering it, but it definitely isn't. Has anyone got any other ideas?
I guess your UISlider fell out of bounds of the superview. Try to set background of UISlider superview to some color and check it out.
Its in your control to set the height and width of UISlider, using CGRectMake... and its touch sensitive till the given width.. i think u would have missed writing the below option...
silder_Obj.userInteractionEnable = YES;
Just try it out.. it had worked for me.
I found out that in my case, the issue occurred when the right/left border of the UISlider matched its superview's corresponding border. Making the superview wider so that there would be 5.0-10.0 distance between their borders solved the issue for me.