I've a problem with the scrollview in IOS 7.
at first, it didn't work at all not even on IOS 7 or IOS 8
but after I added this code:
it starts working on IOS 8 but still not working on IOS 7.
[scroll addSubView:contentViewScroll];
scroll.contentSize = contentViewScroll.frame.size;
can any one suggest a solution??
Your contentSize needs to be bigger than your frame size in order for your scroll view to be scrollable.
I've fixed the problem...
as everybody says, my content size was bigger than the scrollview frame size, but the scroll was not working. after spending hours in this issue, I've managed to fix it by fix all the warning on the controllerview. after all the warnings are fixed the scroll starts to work.
maybe this sounds stupid, but fixing the warnings got the scroll working at last
Related
1I am using Xcode 11 for this project which is fully used autoresizing. Now all screens become like this. Not getting what issue it is. It's working fine in Xcode 10.
1.Try adding constrain again and works.
If point 1 does not work.
you can also set height of the view by calculating the total height of your content.
I have older code, written for iOS 6. I need to implement it for iOS 10 with some new SDK. I have some XIB's. Everything was working perfectly when I was changing them. But in one XIB, when I try to change Image in my Interface Builder of UIImageView, whole layout just collapses. I have 2 views, called TopBar and Content. When I try to change just background image of TobBar View, Content view just collapses, actually, TableView in Content View just goes off the screen on the right and you can scroll to right to see content of a cell. Everything is shifting in my Content View to the right. In my XIB, image view is shifted, TableView is so big to the right. When I place everything as it was, sam thing is happening after build. I have been reading for some time now, and changing from XCode 8 to XCode 7.x in my IB does not work, layoutIfNeeded does not work. Does anyone knows what's the problem? Code still uses Autoresizing masks.
Anyone in same situation as me: in XCode 7 it is working. So, I draw in XCode 7, and build in XCode 8, but I need to build for like 8 times, when it fixes itself. I have reported a bug to Apple.
I'm not a fan of XCode's betas; I did want to try the one for XCode 8 though. However, one weird issue I'm having is that once I've opened my 7.3 project, the Storyboard enlarges all of my views into a ScrollView towards the right side--as the screenshot below shows:
I don't use Autolayout, because most of the time I set my views in specific positions.
The contains ScrollView of those 2 controllers is 320, so it doesn't get resized, only the views inside of it.
Do you think the release version of XCode 8 will fix this issue?
Or have you encountered the same problem?
Thanks!
In the StoryBoard, select your ViewController. Open its sizeInspector, set the SimulatedSize to "freeform" and then select the size you want.
Hope that helped.
This issue has been fixed on XCode 8.1, finally Apple did something good :)
I've worked once on an iOS7 app with a lower Horizontal scrollView with custom buttons that let me choose some options. That worked fine, but now while we are giving iOS 8 support, the scroll view appears blank.
iOS 7:
http://postimg.org/image/djv26la4f/
iOS 8:
http://postimg.org/image/4asvwh18f/
I've been trying some possible fixings but I'm stuck in this. Everything is being done programatically, no autolayout.
Do you have any idea of which could be the problem?
Thanks in advance.
I finally fixed it. It was a problem with the frames as hasan83 said.
After hours of debugging I noticed that a group of frames was with wrong frames despite of using the same code. I fixed it by making distiction between iOS versions.
Thank you for your help!
Something is troubling me. I have a UITableView with cells that contain images. When using the iOS 7 simulator, the images gets constrained to the cell's height. When I tested it on the iOS 8 simulator, the cell expanded to the height of the image, and it is kinda buggy. Buggy because the height may change back to the height which appeared under iOS 7. Can someone kindly enlighten me please =D
My app is built using iOS 7 by the way.
Seems like all I can do for now is to use this:
self.tableView.rowHeight = 44.0;
Do let me know if any of you geniuses out there got something better =D