Displaying user information on an popover alert view controller - ios

I am working on an app for a Cafe where users can "sign in" to their seats.
Currently I am thinking of a way to present basic user information of seated people. What I am envisioning is to when the table gets tap, a square information box (pardon my primitive language) appears in the middle with the background being blurred out. I am hoping to have something flexible so that i can add tab and such to this so called box.
I have been looking at popover alert controllers and apparently there is limited information on them in regards to the iPhone. Is there a reason why popover view is not used for iPhones as compared to iPads? Moreover, is there a smarter UI to handle this or should i just segue to the next view when tapped.

Basically, popovers are iPad-only because iPhone screens are too small to make them effective. UIAlertController is a similar alternative, though it may not lend itself to what you're trying to accomplish.
Segueing to a new view for the user information is definitely a solid option, or if you want to preserve the feeling of staying on the same view you can animate a custom view over top of your current view, often from the bottom in the style of a keyboard or the settings drawer.

I think you are mixing up two different concepts: Alerts vs View Controllers being displayed modally.
Alerts – as the name suggests – are used to bring something important to the attention of the user. They usually interupt the current flow.
View Controllers presented modally are similar to what you discribe: a new View Controller moves over the current one, and the current one is blacked out to put emphasis to the new one. As you rightly pointed out though, this is hardly used on iPhone: This is because iPhones historically have rather small screens, and scaling down a view controller leaves hardly any room for content.
View Controllers presented as popovers is yet another thing: Here, you show the new view controller in a separate window that originates from a specific point in your UI.
This document might be of interest for you.

You may want to use a Modally presented View Controller. For this, you will create the view you want to pop up in a separate view controller. Then, control-drag in a segue from the parent view to the Modal of type Present Modally. You can even get your blurriness by setting your Modal's background to clear and adding a Visual Effect with Blur to its view.
Now, give the segue an identifier in the right hand pane so you can call it programatically.

Related

Change detail transition animation UISplitViewController

I have a UISplitViewController. When run in compact mode the detail views are "pushed" onto the navigation stack like pages (with the back button in the navigation bar).
I would like to simply change the page transition animation from a push from the side, to a modal style animation: i.e., have the detail view slide in up from the bottom. But only have it animate as a modal when the UISplitViewController is in compact mode (running on smaller devices - i.e., iPhones, etc).
An image for context:
As you can see, this is a normal page transition, but I would like the detail to slide up like a "page sheet" transition if possible.
I've tried modifying the segue in Main.storyboard however that changes the transition even for regular sizes (i.e., iPads, etc) which makes an additional detail view slide over the side-by-side view that's seen on regular sized devices.
Any help is appreciated!
Although it is doable, I would highly recommend against it. If you still want to go ahead with it, the simplest way would be to create two identical viewControllers with two different segues and segue types. Then you can make a check on device idiom and call the relevant segue. Again, I would not recommend such an approach

UISplitViewController should be root, so how to "push" the real starting view on top?

My app design is very simple, at least with respect to describing the intended user-facing views:
The starting view is initially empty. Pressing a "Select" button in the navigation bar transitions to a split view. On the left (master) are the photo albums on the device. On the right (detail) are the images in a given album. The user can select up to 6 images across all albums. Pressing a "Done" button in the navigation bar transitions back to the starting view, which now displays the selected images in a grid. And that's it.
In my head, this should be as simple as embedding the starting view in a navigation controller and adding a segue from the "Select" button to the split view. But of course, it doesn't work that way. According to the Apple docs:
Although it is possible to install a split view controller as a child
in some other container view controllers, doing is not recommended in
most cases. Split view controllers are normally installed at the root
of your app’s window.
If at all possible, I would like to retain my user-facing design without any shady business. I strongly suspect that there are one or more "sanctioned" ways to accomplish what I want, but I am too inexperienced with iOS development to know what they might be. Any help is appreciated!
If all you want is to pass back to the starting view controller the array of images, than why not just declare a protocol in the Split ViewController that the starting controller can adopt?

How to always show a viewcontroller even when navigating screens in iOS?

I have this music player view controller that can be minimized. Thanks to LNPopupController[https://github.com/LeoNatan/LNPopupController].
Everything is working fine, but I have no idea how to make this music player view controller stays on top even when the user navigates to the other screens (even when the main navigation controller pushes another view controller). The app doesn't use tab bar controller by the way.
So, is there a way to implement this kind of idea? Again, sticking the minimized view controller on top of every screens of the app?
Developer of the framework here.
If you present the popup bar from a navigation controller, it will appear for all pushed controllers. Likewise for a tab bar controller.
If you need to have it for all controllers, it's not easily possible. One way is the have your entire application scene appear as a child controller of a view controller, and have that controller present the popup bar. This is a difficult way to make it work, and not recommended. It has many issues.
The popup controller is not meant to appear on the screen all the time. It is meant to implement a similar functionality as Apple's.
add the minimized view controller on keyWindown which your minimized view controller always on top ,I didnot Know whether can help you,the code demo gif as is show,If anyone need Demo,give me Email:59620one463qq.com(replace one to 1) to get demo

Navigation Bar item Become Title ( while slide, without disappear)

Im sorry if the Title of question isn't 100% correct. To be honest Im not sure how to describe my question. I have problem. I have app which has Navigation Controller (title is called List). In navigation controller I have "Add" item. When I touch the Item, new View Controller is called. When I touch Back button, which is called "List". When I do slide gesture to go back, Button < called "Title" disappear and again appear even if name is same - "Title". I made gif animation to be clear. Does anybody know how to make my app just slide the title without any (dis)appear? Thank you very much and sorry If my english is not best:)
This is the standard UINavigationController behavior and I don't believe you can easily change this. Two options come to mind:
If you really want this feature, the simplest solution is to tell your navigation controller to not show the navigation bar:
Then you can add your own navigation bar to your scenes. You'll have to manually add back buttons that you hook up to IBAction that pops the view controller (or an unwind segue to the previous scene). If your app supports landscape mode, you may also want to tweak the rotation behavior so it's shorter in landscape mode than portrait mode (like the navigation controller does).
By doing this, you still enjoy the navigation controller functionality (pushing and popping), though you're manually adding navigation bars to every scene. The UX isn't going to be identical and you lose interactive pop gesture, too, but it's probably the easiest was to achieve your desired transition animation.
If that's not adequate (e.g. you need interactive gesture for popping, etc.), then you can write this yourself, retiring the navigation controller entirely and then use custom interactive transitions. This was introduced in iOS 7 (see WWDC 2013 video Custom Transitions Using View Controllers) and revised in iOS 8 (see WWDC 2014 video View Controller Advancements in iOS 8).
Frankly, these both feel like heavy-handed solutions (especially the second one), but if you really want to change the animation of the navigation bar associated with the navigation controller, then these are two options. Personally, I'd step back and do a cost-benefit analysis of this endeavor and decide whether this is worth it for a fairly minor UI issue.

master controller with buttons needs to load pageviewcontroller. master buttons not accessible after first load

I am new to xcode and IOS (and this board. First post).
I am completely flummoxed by a design problem and unsure how to approach.
I have three buttons, each of which calls a new array of pages that need to navigate horizontally with swipe gestures and have their own buttons.
The three buttons in the parent work exactly like a tab bar except they have to be bigger and higher than a tab bar would be. The called page arrays mostly work like a pageviewcontroller except that the pages need to have a button/indicator below to allow non sequential navigation. The target HAS TO LOAD WITH A SEGUE.
The problem I'm encountering is that using a modal segue to load a pageviewcontroller and prepareForSegue to keep the master/parent view controller visible results in my buttons being inaccessible. I assume its because I cant click thought the child view controller.
Secondly, I don't know if its possible to customize the page indicator dots of a pageviewcontroller so they can look like a bar with graphics.
Here are my specific questions:
Is it possible to load a view controller with a modal segue and still access my buttons? Can the child be resized?
can i customize the buttons/indicators in a pageviewcontroller. Can you point me to some code?
should navigation like this be done with some completely different approach? What about a view controller container?
Here's a diagram (cant post images directly yet)
I've found the answer to my second question: It seems that pageViewController's indicators are not customizable in any way. This rules out pageViewController for what I need.
9 Views in 10 hours. Is this not the best forum for questions like this or is there something wrong with my post?

Resources