I have a simple UIViewController_A in a Storyboard with a button on it. The button modal segues (page curl) to UIViewController_B which has a container view. The container view then embeds UITableViewController_A. The table displays 1 section containing 3 custom static cells. Each cell has a label on the left and a switch on the right.
When I click on the button, the table is properly displayed where I want it but the cells content, labels and switches, are animated to their positions.
How can I disable this animation? I suspect it is the embedded tableview getting animated while being resized, but am not sure.
I put a simple demo of the problem on github : https://github.com/droussel/UnwantedAnimation
Thanks!
I noticed that only the middle cell animates in. If I increase the cells to 5, the middle 3 animate. This only happens with the partial curl animation -- this looks like a bug in the auto layout system to me. If you turn off auto layout, the problem goes away.
I don't know much about storyboard concept.But I suspect you are starting some animation in button action to have an animation like paging.If so, then just commit(end) your animation after achieved what you want.
[UIView commitAnimations];
Hope it will help you.
In Storyboard segue to that scene/view, open the Attributes inspector, and uncheck ANIMATES. Turns out there is a bug with iOS8 with Partial Curl/Animates.
Hope that helps!
Related
You need a scroll view to implement it as shown in the picture above. But I don't know how to implement it. That's the only thing on the storyboard that's missing.
And when you run it, you just move the scroll bar next to the screen, and there's no change on the screen.
Do you have any suggestions?
Have you tried to deselect Content Layout Guides?
I have a UIPageViewController that shows 3 child view controllers. The controller is working fine, but on the first page he shows a few vertical columns of pixels from the second page (you can see the grey of the search bar and a selected cell). This behavior is not occurring between the 2nd and 3rd child VC.
First VC (see the overlap on the right side)
Second VC (no overlap on the left or right from the 1st or 3rd)
Third VC:
The code relevant to this issue is here: http://pastebin.com/Dn7nkKHj
Could this be an auto-layout issue? Or an issue with the UIPageViewController. And how can I avoid/correct it?
I don't think that this is an auto layout issue because if there is some issue due to auto layout it will create same effect with second and third view controllers also. Can you please share our storyboard so that I can look check whether there is some auto layout issue.
This is a bug, filed in bug reporter as bug n° 22947439
There is a workaround however:
In the above screenshot, I have circled with a red dashed line the setting you need to un-check. After this, you need to make sure the “constant” value is not -20, but 0. Repeat this for all the leading and trailing constraints of your table views.
I don't know exactly why, but the scrollbar of my tableview never reaches the end.
This is the middle of the tableview, everything looks fine
But when I reach the end
The scrollbar doesn't reach the end...
I guess my constraints are ok (I'm using autolayout), because besides the scrollbar, the tableview is well displayed.
My view controller is a UIViewController and contains only a UITableView. Here is a screenshot that sums it up :
No constraint is added by code. Do you know how could I debug this?
Thanks in advance
Edit : I have tried to delete and recreate the view controller (by copy and pasting the UITableView) the problem is still here.
Edit2 : If I change the bottom constraint to "Bottom of the view" instead of "Bottom layout guide", this works well.
The problem is that my view doesn't have a correct height, because it is supposed to go under the tabbar.
Any ideas ?
I've fixed the problem by settings the property automaticallyAdjustsScrollViewInsets to NO.
More details could be found here:
https://stackoverflow.com/a/21302259/1295537
What could be happening is you have clipping disabled, and the frame for your tableView isn't the entire height of the view.
Or, you could have contentInsets set, which changes the size of the scroll indicator as well.
For those who the above solutions don't work, try this. It makes no sense tho, but it works (In my case I needed the UITableView to behind other views, so I just added a dummy view)
https://stackoverflow.com/a/23019724/1148910
Instead of using a normal View Controller and dragging in a tableview in a storyboard (which I assume you're doing), have you considered using a Table View Controller? You shouldn't have this problem in that case (I never have). You can easily embed the Table View Controller in the Tab Bar Controller.
Hope this helps!
I'm quite new to the Xcode programming. I've added some view controller, labels, buttons and image view to my program, but, when I try to adjust, for example, the size of a label, the view controller that that label is in, gets displaced. I mean, when I try to drag the side of the label to change its size, the view controller moves down, making my label get displaced in the view controller. It is a very weird situation, here you have the screenshot of my project, the view controller misplaced is the one that says "Perfil" on the navigation bar. Every time I try to change one of those light blue views size, the entire view controller changes place. The more I try to change the side the more it will go down.
Sorry for my English, not my native language.
I think the bigger issue is that you are using Table View Cells that are not part of a table view.
Table ViewCells are supposed to be a part of a UITableView and not just stuck in a view.
Using UITableViewCells in this way is what is causing the strange behavior.
If you are trying to make a table, put a UITableView in your view, and then you can customize the table view cells in there.
It you aren't trying to make a table, just use UIView's instead of those UITableViewCells.
I have two ideas that may fix the problem:
First, if you're trying to drag and drop the label but the view controller moves instead, then you might just be grabbing the view controller's background by mistake. When this happened to me, it was because the order of my components in the xib file was wrong. Things are ordered from back to front, and when you click and drag something, you'll just be clicking and dragging whatever's on top. You can try and get past this by clicking the UI element on the left to be sure you select it, then dragging the handles.
It looks like you have things in a reasonable order, so that may not be the culprit at all.
Second, if that doesn't work, select the element you want to edit on the left, then open up the utilities pane on the right. Click the Attributes icon (should be fourth from the left) and look towards the bottom. You should see something like this:
Just manually edit the position and size of your labels there. You should see the change immediately reflected in the display.
Hope this helps!
Setting no autoresize behavior in Interface Builder solves the issue.
Using Storyboards, I have a scrollview with a UIView embeded into it. On that UIView I have some text and a button. The button is down a bit, for this question.
When I scroll in the simulator and on the device, the UIView gets cut off where the button is. (button there to show the cut off)
Above pic is before scrolling.
This pic is showing the scroll UIView and the button embeded into it being cut off.
I have set the Size Inspector to 1000 height.
I have searched on stackoverflow and I have not found an answer as of yet.
Thanks for any help.
It looks like the hierarchy of this particular window is not ordered properly. You need to rearrange your hierarchy. To do this, go to your storyboard, and click on the little button on the bottom left that looks like the play button with a box around it. From there, you can adjust.
I had the same issue in an app i was working on. For some reason, it didn't work for me either. I suggest you try creating the the scrollview and the view inside it programatically instead of storyboard for this particular view controller. It will work like a charm. You will also have to find the length of the inner view and then set the size of the scroll view to the size of the view embedded in it.
I figured it out. Not sure if this is the preferred method or just a work around.
The main difference is I connected the last ScrollView, not the First one. Not sure why but it works.
Before, (pics above in original post with cut off button), it would cut off my UIView. I still would like to know "why" it does this. Thanks for the reply's.