I remember seeing multiple apps that will have a little i on the bottom of the screen, and the corner will flap up a bit to show a few things, such as a masthead. The Maps app (before iOS6) has what I'm talking about in the bottom right corner. It shows allows you to print maps and drop the pin, etc.
I want to do exactly that. I want that corner to flap up, and show that I created it, and anything else. Is there any way I can create this? It can be text-based, image-based, anything. I tried something, but it didn't work:
I created the i (made a 'Round Rect Button' and turned it into an 'Info Light button), and tried making a new window in the .xib, and linking them together, but it didn't seem to work.
TL;DR: How do I create the info page that flaps up from the bottom right/left corner?
BTW: I'm using XIB, not storyboard.
That is fairly easy. You have to present your viewcontroller modally and set the transition mode:
controller.modalTransitionStyle = UIModalTransitionStylePartialCurl;
You can try to start a new project....select Utility Application....it will make a flip between the two viewcontrollers....just change the transistionStyle to what I wrote above then it should curl up like in the maps app
Related
Im working in Swift and I am going to set up my view like this:
When the user swipes up, I want to animate the top image view and text so they move up WITH the swipe in the moments before the app is exited to go to Safari (the swipe gesture triggers opening a url).
I am trying to figure out the cleanest way to accomplish this - I am planning on simply animating up the image view using UIAnimations, however Im not sure the animation will go through all the way before the app is exited. Is there another way to achieve this effect?
I also need to know if it is possible to change the direction that the app "switches out" to Safari- by default, Safari comes in from the right. It does not look as good this way and Id really like Safari to segue in from the bottom - Can I force external apps to segue in from a different direction?
What are the constraints/alternatives to place an image that stays on top of all iOS "layers" and windows. Think of it as a lock screen but that still allows you to interact with you phone, meaning browse, answer calls, etc. The image will be displayed in a transparent way (say 40%) and will be launched by an application.
Not really sure what you are asking for but if you are looking for a way to add some code once and it shows everywhere on each of your ViewController then there really is no way to do that.
What you can do is
Use UIToolBar
add buttons to that tool bar
Add that tool bar to each ViewController in storyboard (where you need them)
Create a global function / method that you can call in from any ViewController that has the button actions in it. That way you edit the code once in one place and use it every where.
If you don't like UIToolBar then
you can add your own UIImageView and add a transparent background to it
Add your buttons on the UIImageView. (You will have to add constraints)
then show that on every ViewController
If all this seems to much work then you can use existing controls HERE and see which one fits your needs.
This maybe a good one - FCVerticalMenu
iOS 7 has changed how maps are displayed by apps on the iPhone, and especially how the user configures the map.
The map is displayed like this, with an Info button.
When the user taps the Info button, the configuration screen slides up.
How do I recreate a screen overlay like this in my code? While I don't want the user to be dropping pins, I want the user to be able to switch between different map styles or open the address I'm pointing to in Apple's Maps app.
If you are trying to do a simple overlay view, then look into making an UIView slide up through UIView animations. Other than that, you would need an UISegmentedControl and related code. You would also need to blur the view and make it translucent, so look into my other question and answer on how to properly blur an UIView:How to apply blur to a UIView?
I've never looked into it, but I've heard the only easy way to do a translucent background (as in, without writing your own OpenGL code) is to create a UIToolbar instance.
I'm guessing you'd make a toolbar with no items, just treat it like UIView and add your own subviews (UITableView, etc). It is a subclass of UIView.
I'm currently working on an iOS app that is pretty much supposed look and work like an already existing android app.
As a part of that, I'd like to make the top navigation look the same, but since iOs devices do not provide a hardware or software integrated back button, I'd also like to keep the back button navigation that's common to iOs apps.
I've tried numerous attempts to achieve it, but I'll stick with the latest I'm working on since it looks the most promising. I've started to work on a custom UINavigationBar class that overrides the initWithCoder: and layoutSubviews: methods. The result is as follows:
As you can see, the back button now overlaps the application icon. What I'm looking for is a way to make the button and the text to scale into the space right of the application icon. I've tried to handle this in layoutSubviews: but the superclass logic appears to be rather complex, I was not able to reproduce it's functionality (in particular it seems to be working with some private variables I don't have access to).
I also tried manipulating self.frame before calling [super layoutSubviews] but apart from endless loops I was not able to achieve anything in that direction.
I'd be happy if anyone could point me into the right direction.
If I understand your problem correctly, I think you could do this by adding a custom titleView to the UINavigationItem, and have an image view (on the left side for the icon) and a label (for the title) as subviews. This would replace the default title.
I've got a bunch of controllers on my storyboard but I'm struggling to connect two scenes that are far apart graphically.
You can't seem to do it when zoomed out and when you're zoomed in you can't see both scenes on the storyboard.
Suggestions?
==== UPDATE ====
Holding the arrow at the edge of the screen did it but wasn't easy finding that magic boundary initially.
Ticked as correct answer although not quite sure what was meant by the = sign shortcut.
The doc outline is handy. For those wanting to use it - there's a little arrow button bottom left of the storyboard. Or use Editor > Show Document Outline (or Reveal in Document Outline).
If you hit = sign and then ctrl drag from one controller to other it should work. You hold the end of the arrow at edge of screen and it should scroll the screen for you. Oh also you can use the document outline(the area next to navigator that has the arrow pointing left that opens and closes it) and ctrl drag from one controller to the other.