I have a UISplit-view that uses Table-views in the left hand "Master" area and it seems that after pushing several table-views on the Root Controller, followed by popping them off and all the meanwhile, rotating back and forth between portrait and Landscape, the button in portrait seemed to stop responding.
Upon further investigation, it turned out that it wasn't that it wasn't not-responding, it was that the area that was touch sensitive was sliding partially off the screen making the area that you could touch to get the "Master" popover was at the very Edge of the button making it extremely difficult to hit. I do have a flex space, title, and additional logout button.
Any Ideas?
It turns out that in the Mono-touch split-view template, has two methods in the Detail Controller, in one it hides the popover and button for the Master view while in Landscape, and in the other method it puts it back. I was using one of those methods to add a fexible space item, text item, and logout button to the toolbar. The problem was that because I was doing it in that method, it was adding them every time it went to portrait and somehow the flexible space getting added every time, was slowly pushing the touchable area for the Master Button, off the screen. (The Button itself never moved) After adding the items to the toolbar during the ViewDidLoad method, and not adding it again, resolved the issue.
Related
I've never seen a problem like this until now. When I first updated my app, this problem did not exist. It was fine. Since then there've been a couple of iOS updates, so it's possible this is where the problem began.
I basically have a few view controllers that proceed like a wizard from one step to the next, by either clicking back/cancel button or the next button.
There's a textView covering the main area.
Normally by touching inside the textView it would begin editing.
On this viewcontroller it's fine, that works. No problem.
On this viewcontroller and every subsequent view controller including tableviews with options to select, if you touch anywhere underneath the cancel and next buttons inside the view controller, it dismisses the view controller and goes back to the previous screen. There doesn't appear to be anything executed in my code when this happens. It just dismisses the view controller as if one pressed the back button. I know the back button code is not being executed because I printed a line in there.
The next view controller is a tableView and does not have a textView. It's got nothing to do with the textView. It just dismisses if I touch anywhere on the screen other than the next or cancel buttons. The next views are the exact same way. It's like a big invisible button is in the way of the screen blocking any interaction with the top half.
What's going on here? How do I fix this? It has never done this before and I didn't change anything.
Turns out that this was caused by using page curl transitions. I changed it to flip horizontal and it works now. Page curl transitions are obviously bugged currently.
I have a slide out menu in my app, and just to let you know, I'm new to iOS/Swift, so if I don't explain it well, or use the correct terms, that's why.
I use the SWRevealViewController library for my sliding out menu.
The only code i use from that for all my View Controllers is
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
The issue basically is, when the app first opens, it shows my navigation item's title and all that on ViewController1(default view), but when using the slide out menu to go to ViewController2 or 3, and then going back to the ViewController1, the whole navigation bar/item disappears.
I tried to use something like nav_item.title = "whatever" within viewDidLoad(), but that doesn't work, as far as when i switch back to the first view. The funny thing is, if i programmatically change the title doing that, it changes when it first loads but when i change to View2 and change back to View1, just disappears.
Here are a few images of what i mean, if i didn't explain it well enough, because like i said i'm still new. The development of my app is coming along pretty well because i'm going off my android version i've had done for a while.
Here is when it first loads, title and all. Notice, my background color doesn't overlap or change the top part for the time and battery, which becomes a problem with the later view.
Switched to a different view using my slide out menu.
Switching back to to the original view, the nav item disappears and the background color extends to the full view, overlapping the battery status and time
How does your Storyboard look like? This is how I usually do it.
i am trying to implement some chatroom-like view controller (e.g. Messages-app on iPhone), and i would like to keep the keyboard enabled/open when this (chatroom-like) view controller gets dismissed and therefore gets popped from the stack, BUT dismiss it together with the view, i.e. sliding it out of the screen together with the chatroom-view-controller.
For the desired effect, just open the Messages-app on the iPhone, go into one chatroom/conversation, set the focus on the input-textfield so that the keyboard comes up, but then go back to the last view without dismissing the keyboard.
I always get this weird animation that the chatroom-view (-controller) is sliding out of the screen to the right (which is desired), but the keyboard gets dismissed to the bottom of the screen...
Does anyone know what I am doing wrong? I have already tried it with so many versions, from become/resign first responder in all the different view will/did appears...
My assumption is that it could have something to do with my custom pan gesture recognizer for popping the chatroom-view-controller from the stack of the navigation controller, but neither the docs nor the web contain such issues...
you don't need to keep your keyboard visible, instead you can make snapshot of chatroom controller right before it being dismissed.
Edit: I just created simple app with navigation controller which pushed controller contains text field. Then on app tried to pop that controller when keyboard is visible. And..all view was dismissed together with keyboard, so your wanted behaviour is given by default.
I'm trying to achieve a view transition style, the one that you can see when you slide from the left side of the screen towards the middle if you're in a view that can go back. (find any app that has a back button somewhere, and just swipe from left to right starting from the edge of the screen).
The difference between this and a regular push transition is that you can see the next AND current views on the same screen and, as you slide (if you go slowly) you can really see the view and "play" with it. But right now what it does it simply quickly slide (with black on the back) and show the next view.
I'd like to be able to do that between some of my views and i have no idea how to achieve that. I'm just using a custom segue that goes left to right or right to left but that's pretty much it.
Any idea how to achieve that?
If you are using a UINavigationController and the pushViewController:animated method, then this should be the default functionality on iOS 7.0 and later. Your new UIViewController will be able to be "pulled back" by the user using a swipe right from the left of the screen.
I'm not sure when or how this happened in my project, but it did. The main button in the middle of my initial view controller ignores all touch events when I first load the app. The buttons in my navbar on the bottom all work fine.
If I follow one of those buttons through a modal segue to another view controller and then segue back into the initial view controller, the button works perfectly.
I'm at a loss. Any idea how this could have occurred or how I could fix it?
Update
I can't put my finger on what, but this has something to do with my constraints. If I remove them (and my app tumbles into a mess on 3.5 inch phones), the button works at all times.
I have the same problem: on the first load of the view one particular UIButton doesn't work, but if I tap on other tab bar element, launching a segue and then coming back to my home screen, it works perfectly.
My problem persists even if I remove every constraints for the view.
In my case, the POSITION of the button seems to be the cause of the issue: in the right side of the view it becomes not working, but if I move the same button on the center or left of my view it becomes available.
HELP ME/US :-(