I need to present of a menu UIView on top of my main UIView. This happens when the user clicks the square button as illustrated in the picture. It´s kinda of a facebook app layout except the main view is not pushed away, it´s still in position but with the menu view on top of it.
The menu is supposed to be around 80% in screen width and sliding in from left when clicking the square button.
Every possible non-external-lib solution I´ve tried so far failed so I´m really need some help with this one. Code examples or a push in the right direction would be highly appreciated!
Requirements: No external libs.
Facebook Navigation
Here is an app demo that you can try to use the code from
Related
I don’t really know where to start as I’m still new to UIKit, but all I want to do is when I tap the middle tab button, which I’m handling already right now and it will slide up a view controller that sits and covers the screen and the background is dimmed so you can see what’s on the background. The height of the main contents only takes up about 40% of the screen from the bottom.
And I want to have this appear with a slide up animation. Any pointers on how to achieve this would be appreciated.
Thanks everyone in advance.
I have an rss app that I'm working on in xcode and the articles load up in a full screen web view. I need to place a "share" button in the navigation bar but since my uiwebview is full screen it won't show up when I run the app. I even tried cropping the top of the web view lower and placing the button there but still no luck. Here is an example of what I mean:
The share button needs to be on the right side of the navigation bar but i cannot seem to figure out how that make that work.
Thanks in advance
Fist of all, your top navigation bar seems to be missing (judging by your image). Since the nav bar is missing there is no possible way that the share button will be visible. You can do this is the IB or in your code.
For your IB you can move the view controller's 'layer's' so to speak. When you place all the elements down, your VC should look something like this:
On the left hand side we can see what subviews are at the top and which ones are at the bottom.
As we can see here that the UIWebView is at the top of the list, so it'll be at the bottom of the pile. The navigation bars are further down the list so they'll be at the top of the pile. So due to this they'll go over the UIWebView.
The other way to do this is using insertSubview:aboveSubview:. Fist of all you'll add your UIWebView using addSubview: and then add the nav bar using insertSubview:aboveSubview: and finally you'll add your button the someway as you did for the nav bar, but this time you'll be adding the button above the nav bar not the web view.
My best guess is that your forgetting to add another navigation bar to the top of the screen. Hope this helps!!
I'm looking into implementing a subview in a view controller that will sit as a bottom bar of the screen until the user holds down and pulls it up to the top of the window to cover the whole screen.
What Google Maps does in Android/iOS with clicking on a pin and pulling the bottom bar up to see details is exactly what I want to implement.
Here's what I'm talking about. I'm not sure what the best way is to implement this.
I can either have an animation that is hardcoded when the bar is clicked causing the view to expands up and cover 3/4 of the screen and anchors there and 1/4 of the screen will be a map and once the map is clicked will drop the view back down. Or have the user drag and pull up the view and pull it back dock to anchor.
You should have look at demo code from following github link which have implemented pullable behaviour similar to the Notification Center in iOS:
https://github.com/crocodella/PullableView
I have been looking for an answer to this question on google and other places, but have not found a helpful answer as of yet.
I am making an app on Xcode 4.6 using storyboards. I am using a View Controller with a Scroll View inside it and images and text inside the Scroll View.
I have managed to display admob ads put these only appear at the top of the page and go away as I scroll down the page, as the ads are pinned to the top.
I have managed to achieve a scrollable page where the ad stays at the bottom of the page on Android, but not in xcode. I have tried to edit the banner view in the .m file but this has only moved the ad banner down, towards the middle etc.
For example, this is website shows what I am trying to achieve -
http://googleadsdeveloper.blogspot.co.uk/2011/12/incorporating-android-admob-ads-into.html
I would like to achieve the same thing in iOS, Xcode 4.6, so that my apps are consistent throughout the two operating systems.
Thanks in advance.
Don't put the AdMob View inside the scrollview.
Move the bottom edge of your scrollview up so that the banner has enough space.
Place the banner underneath the scrollview. Make sure that banner and scrollview share the same super view (red arrow)
Adjust the autoresizing mask so the banner stays at the bottom. (blue arrow)
activate the "allow horizontal resizing" arrow too. I forgot to do this for the screenshot
I'm making an iPad app, and basically, I want to make a tray that pulls out from the bottom of my app, and I'd like to have a little tab at the bottom of the screen that if you pull, it brings up an image, and the image's height would match the height you pulled the button to. It's a bit like how the notification center works, except the tab is always visible.
So my question is how would I have the image follow the tab as it moves vertically across the screen? I would assume using a UIButton for the tab and a UIImage for the tray would make sense, and I have some code for making buttons move, but how can you make one object follow another?
Thanks for your help,
-Karl
I wouldn't use a button for the tab -- just a regular old view.
To make your image follow the tab (however you implement either of them), simply animate them both together. That is, if you create an animation that moves the center of the button to the Y-coordinate of the user's touch, you can at the same time move the image vertically by the same amount. The two objects will then seem glued together because they move together.