Xcode11/ iOS13 collectioncview not working but xcode11/iOS12 is working fine and Xcode10/iOS13 working fine.
issues is,
"The behavior of the UICollectionViewFlowLayout is not defined
because:
> 2019-10-29 10:55:17.781597+0530 Storefront[360:20094] the item width
must be less than the width of the UICollectionView minus the section
insets left and right values, minus the content insets left and right
values"
I don't where it is exactly occurred.
Xcode11/ iOS13
I had issues with this error message as well. My CollectionViewCells were all messed up.
Go into the Interface Builder. Then navigate to the Size Inspector (for the CollectionView) and set the Estimated Size to "none".
Related
experts!
Today started to build Apple Watch version for my CelebrateMore! app and can't solve one issue. I have 2 interface controllers - Page-based kind. As soon as I set segue to "next page" from first to second, my first interface controller starts to scroll much more than before.
Screenshot from Storyboard:
Screenshot from simulator during scrolling:
Screenshot from simulator if I remove next page segue and scroll:
Already from scrollbar it can be seen, that there is a lot of empty content if "next page" is used. Does anyone has some idea, how to solve this, how to avoid "the long after content scrolling" issue?
I've struggled with the same issue for several hours until I decided to give it up for a while and focus on filling the labels with actual data at runtime. After I added some code to the main initialisation methods of WKInterfaceController ((void)awakeWithContext:(id)context {} and/or (void)willActivate {} ), this scrolling issue magically disappeared. Try to set the text of one or all the labels in your interface in code in one of the 2 methods mentioned above and see if the scrolling problem gets fixed:
[self.label setText:#"Some text.."];
It worked in my case.
Due to low reputation I cannot upvote: The solution of setting the text of a label worked for me too. I set an empty text first, then load the data and update the label there again once the request is successful. It works and calculates the height of the scroll view correctly.
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
//enable correct scroll height
self.titleLabel.setText("")
self.loadData()
}
I used a different way to work around it.
First put a group in the InterfaceController, and assign fixed height to it, then put other components inside the group.
To make the group occupy full screen, its height for 38mm should be set to about 142 point and for 42mm should be set to about 165 point. You can use the plus sign next to the value to enter these values for the 2 models.
I am trying to initiate a scroll view in my UITextView and even though I seem to have selected the appropriate boxes, I can't seem to get the scrolling working. I have gone through multiple questions similar to this but none seem to have the answer.
I included an image of Xcode below:
Question 2: When I scroll down the majority of my text shows but the scrolling stops with two sentences or so left and I have to scroll down and hold it there to read. Any way I can fix this so it scrolls all the way to the bottom of the text?
Can you check the two boxes: Bounce Horizontally and Bounce Vertically and see what's happening? Sometimes your content are actually way bigger than your view, and they are touching a invisible outer box. If you can see they actually move, that means there is nothing wrong with touch or scroll, is just the view layout problem.
For the content issue, my guess is that the content size is not right, you can programmatically adjust it with textView.frame property, set it to a proper size, such as the frame of the window or the frame of the content, which are CGRect classes. Comment below to see if this can solve your second problem.
The text view will not scroll in storyboard, only the app. And the text view will scroll once the content in the text view exceeds the frame size.
If you're using iOS 7+, you can just turn on auto layout, pin each of the sides of the text view to the edge of its parent view, and it works fine without needing to do anything in code.
I've read a lot of documentation but still don't really understand how that UIScrollView works.
I have an example where I use an UINavigationViewController with the status bar (little top bar with wifi, battery, etc., icons) and a navigation bar (with the "back" button).
As the first subview of the UINavigatioViewController's main view I have a UIScrollView. Inside it I have created several subviews that make it's contents size to be 500 points.
In the "viewDidLoad" method I set the scroll view's "contentSize" equals to 500. But it doens't completely scroll down to show the last subview.
I read that I should add some points to the "contentInset" because of the "bars". I don't really know why. Isn't the scroll view inside the main view that is correctly framed? Why does it need to take the "bars" into account?
Anyway, I read that it should be like 64 points (44 navigation bar + 20 status bar). But it doesn't work.
The "magic" number (at least for me) is 84 points. I must add that quantity to the content size (584) or use it as:
self.scrollView.contentInset=UIEdgeInsetsMake(0.0,0.0,84.0,0.0); // AT THE BOTTOM!!
I'm really confused about this. Could anyone give a hand on understanding it?
Thanks.
self.scrollView.contentInset=UIEdgeInsetsMake(0.0,0.0,84.0,0.0);
UPDATE
I have seen that because I made my ScrollView size bigger in Interface Builder in order to add new elements beyond the normal small visible size, it had a "frame" size near to 500 points.
I set it frame size to 416 (just to fit and cover all the visible space) and now with a content size of 500 points (without any additional inset values) it scrolls perfectly.
But I still don't understand the previous behavior...
I have a UIScrollView- scv and a UIView - ocv that have been generated dynamically (no IB), I have added ocv as a subView of scv. Initially i set the content size of scv to the frame size of ocv. But at run time I have to increase the width of ocv because I keep adding subviews onto ocv that extend beyond the left boundary of ocv. Now when I set a new contentSize for my scrollView, It scrolls to show the right side of ocv while the content I want to see is on the left.
Same is the case with top. I keep adding subviews beyond the top boundry of ocv, but i cant scroll to see the top part, i can only scroll to see the bottom empty part..please suggest me a solution..
I believe it is simple. Can u please check if u have selected sc are being checked in your
Interface builder? If everything is fine there, then please increase the height of your scroll view namely scv and also specify your UIView and the additions of subviews to it through code rather than from Interface builder?
I've a window with a horizontal split view. On the bottom pane of the split view, I have a nssegmentedcontrol, aligned to the center. On the bottom of the nssegmentedcontrol I have 5 tabs that are controlled by the segmented control - click in one of the cells and the corresponding tab opens.
My problem is, if I completely minimize the bottom pane, to the point where the dividing line touches the bottom of the window, the segmented control gets pushed on top of the table header and never goes back to its original place.
I've tried fiddling with IB to get this to work, but no luck. Has anyone experienced this?
Following what's on the comments, I replaced the default split view with the one found in BWToolkit that allows for the definition of minimum and maximum height of each view.
BWTookit is a no go, the framework leakes a lot.
You should use RBSplitView (google it), it also gives you option for min and max height
and I started using it because of a bug in the split view as well, I used it for a chat window
but the split view didn't autosave as it should, every time it got like 2px smaller,
RBSplitView is great, and doesn't leak.