Editing Event in UISplitViewController - ios

This problem has been plaguing me for a week.
I have a UISplitviewController where both panels are always visible. In the master view, I have a list of calendar events, and when I select one, it loads the event into the detail view. I can edit the event fine, (the EKEditEventViewController is presented in the current context, showing up in front of the detail view only) but in iOS8, when you click the location cell, a new view controller is presented and searches for addresses that you type in. My problem comes when I dismiss this location selection view controller. When dismissed, the EKEditEventViewController behind it fills the whole screen (it appears partly behind the master view in the split view controller). When rotated, everything goes back to the way it should be.
Any idea why this is happening? Any help is greatly appreciated! Thank you

I had a similar problem:
eventViewController.modalPresentationStyle = UIModalPresentationStyle.CurrentContext
did it for me, but this is what you've already done, as far I undestood.
Maybe putting the EKEventViewController in a UINavigationController smoothes out some other things, and setting there the current context could help.

Related

Transition of a view controller embedded in a navigation controller

I have a problem with a transition. I am modifying this project https://github.com/xxxAIRINxxx/MusicPlayerTransition in order to have the transition from the right instead of the bottom. This part is fine. My transition comes from the right.
My problem is that I'm embedding the presented modal view controller into a Navigation Controller. I do this so I can use the "pushViewController" function when I click on a cell of my modal view controller.
My hierarchy is as follow. I have a dashboard. From the right, I drag a TableViewController X. If I drag back in the opposite direction, I come back to my dashboard. Fine. Now, If I tap a cell, it pushes a new ViewController Y.
Now, if I am in my new ViewController Y and that I drag back, I come back directly on my dashboard instead of going back to my TableViewController X, as a natural navigation controller should behave.
I did a small project on github that does only that, so you can easily see my entire code.
https://github.com/magohamote/NavigationControllerTransition.git
I understand why it behaves like this, but I would like to know how I can override the transition set on the navigation controller in order to have the normal behaviour of my navigation controller once it is presented.
Another problem I have not been able to solve. On the project I used as a starter (the one from xxxAIRINxxx) the transition is perfectly smooth. On mine, the first time I trigger the transition, it blinks and get stuck. Once I did it once, it is smooth the next time I drag my view. But the first time is always awful. I don't know why either :(
Thank you a lot for your help!

IOS/Xcode/Coredata: How to force reload from NSFetchedResults Controller When Modal Controller Dismisssed

I have a detail view controller (part of master detail) and an edit screen that appears modally. After you save edit changes, the modal edit screen is dismissed, leaving the detail screen.
What is the best way to get the detail screen to refresh to show the changes made to the managed object context.
Normally the FRC is lazy loaded so the first time it appears it has new data but in this case, I think the screen is already there behind the modal edit screen so when the edit screen is dismissed, it continues to show old data.
Can I use something in lifecycle or how would I know the Detail VC know its back at top of stack?
Thanks for any suggestions.

WatchKit title disappears if modal view shown on paged modal views

This issue is quite simple to reproduce. And I think this may be a bug in watchKit.
If I display View with:
[self presentControllerWithName:#"OneButtonView" context:nil];
It works great.
If I use this view for one button, and open exact same view with that button, new modal view comes on top of original (as expected). If I click title - top most view gets closed and I see parent view. In this way I can create 10 pages and go back one by one to the very first one. Everything is great.
Issue exists only if you try presenting one/more modal views by using this method:
[self presentControllerWithNames:#[#"OneButtonView"] contexts:nil];
If I do that, new view is presented on top (as expected), I can close it by pressing the title (as expected) but title/titles for all pages that were created with presentControllerWithNames: disappear as soon as you come back from child modal view. This behaves identical for one or multiple views presented this way.
I tried setting title explicitly for one/all views presented this way but it didn't help.
Anyone encountered this or have any solution for this?

Navigation Controller not showing Root View (just white space)

long time lurker first time poster here. My question is about Navigation Controllers in Xcode 6.1.1.
Basically I've created a feed app that grabs posts from my Wordpress Site and shows them in a table list. When an item from the list is selected, a web view shows the url from the selected item. I want to manage moving between these two views (table and webview) with a navigation controller, so I embedded one into the table list view on my storyboard establishing the table view as the Root. When I run the app, I get a blank screen with an empty navigation bar at the top of the screen (nav controller is set to initial view). I expect to see the list view inside the controller but I get nada. In the past I've been able to do this without writing any code and it's worked no problem.
Not sure why this is happening, but I'm sure it's something really simple that I'm overlooking. Any help would be awesome. Thanks for looking.
Fixed the issue. I knew it was going to be something really small. All I had to do was add a Navigation Item to the Table View Controller. Once I gave the nav item a title, I embedded the Navigation Controller and everything works as expected now.
I got the idea by throwing a navigation controller object onto my story board and cross referencing the canned relationship against my own and that's the only thing that was missing. Thanks for all your help.

Data disappears when switching between view controllers

I am writing an iPhone application using the storyboards for an initial mockup. The problem I have right now is switching view controllers.
I have a table view controller and another view controller. All I want to do is use a back button to go back to the original screen, and I can do that, except the data disappears. The storyboard that I have is shown below.
I have the Back button going back to the original navigation controller. I have also had it going back to the Card view controller.
I have hard coded some example cells to just see how things look and they show up just fine when I run the simulation. When I click the back button though, it goes back to the All Cards screen and the cells that were there are now gone.
If I need to post some code just ask for what part would be helpful, I have done all of this through storyboards though.
I'm sure it's something stupid I've done, any point in the right direction would be greatly appreciated.
Basically: you pushed where you should have popped.
What you are seeing on the Storyboard does not exist yet. By segue-waying during runtime to a view controller it gets instantiated.
When you segue-wayed during runtime from the Add Card view controller "back" to the Card View Controller - here is what happened: instead of popping the navigation stack all the way back to the Card View Controller you already had, you just instantiated a new Card View Controller and pushed it onto the navigation stack. You could verify that by going all the way back to the original Card View Controller by tapping the back button several times.
What you could do to accomplish your task is this:
Instead of using the Storyboard for your back button use an IBAction in code:
- (IBAction)popToRoot:(id)sender {
[self.navigationController popToRootViewControllerAnimated:YES];
}

Resources