How to add a view that overlaps a tableview in iOS - ios

I want to make a tutorial in my iOS application and I have a tableview with a drawer.
For the first time that the user enters in this screen, a tutorial overlaps the screen first, and disappears after the user taps OK.
Like this
I've tried this tutorial:
http://swiftdeveloperblog.com/creating-custom-user-interface-files-with-xib-in-xcode-6-and-swift/
in which I can use in a UIView but not in a tableview.
I hope someone can give me a hint on how to do it or what to use.

Try this for tutorial view Controller
https://github.com/ariok/BWWalkthrough
In your FirstView controller,
1) Create instance of tutorial ViewController
2) Present that Tutorial ViewController
There is a close button delegate method in BWWalkthrough, i.e. walkthroughCloseButtonPressed() in this method dismiss your tutorial viewController.

I just made a temporary solution to my problem.
I made an image like this:
Create a ViewController and put the image, then add label and button (edit cross dissolve as transition type).
Show this view controller for first time users and go to the next view controller if the button is clicked which is the real view controller(the one that has table view and sliding menu)
The problem here is I need to have different images for different screen size if I really want that the user wont notice the tableview spacing, but it still looks fine.

Related

Swift - present UIViewController

I am trying to present a View but the rest should just stay the same. I think it's easier to understand with some pictures:
If the user clicks on a cell on that view, this view should pop up. But the bottom bar + the "add"-Button should just stay there.
If I just present the view the bottom-bar "pop-up" as well but I don't want that. I hope my problem is clear. I am grateful for every help!
The only way is to add the vc as a subview and make its view behind the plus button view as if you tried to present it , it'll cover everything even if it's modal , follow this link

Swift: Storyboard solution to clicking from ViewControllers to ViewController in a ContainerView

I am building a App with a fixed Top Bar and some fixed Buttons at the bottom. In the middle of my MainViewController I want to have some Tables I switch in between. The ways I want to do it:
clicking the buttons at the bottom
clicking buttons in my tables
To solve the problem I put a ContainerView inside my MainViewController. It works for me already to switch the InsideViewControllers by clicking one of the buttons at the bottom. I solved it with Apples Tutorial programmatically. By click on a button I change The childViewController of my ContainerView.
When clicking a button in my InsideViewController I am sending a message to my ParentViewController (the Container) right now. This I did by implementing a protocol and checking if my parentViewController implements it.
Now my question is if this is the optimal solution to click from ViewController to ViewController inside my ContainerView. Or is there a better way to click a button on my Table and get the next Table?
What I was thinking about is maybe possible:
A storyboard solution. I want to connect ViewControllers inside my storyboard. So that I have a button on my first view Controller and do a segue from this one to the next ViewController. If I do it just like explained the new ViewController is not filling the Container. There pops up a normal ViewController to my app. Here a example View of this idea:
Is it possible or do I continue by sending messages to my parent?
Sure you can. You can start reading Implementing a Container View Controller, specifically, the section "Configuring a Container in Interface Builder". At the initial phase of adding the Container View, you will automatically see a new UIViewController appearing there. I guess if you will want to perform transitions, you will have to Embed In a navigation controller that new view controller.

what do I need to use to change controller when sliding left?

I want to create a touch control, where I slide left and the view scrolls in a paged mode (like in Photos app where you slide between photos) but instead of a view in a current controller coming in, I want a new controller to come in with it's own view. What control should I use to build something like that?
You can use UIPageViewController to navigate between different ViewController like a scrollView
You can follow this tutorial
1-http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/
2-http://www.appcoda.com/uipageviewcontroller-tutorial-intro/
3-http://www.makemegeek.com/uipageviewcontroller-example-ios/
hope it will help you

How to expand a cell view to another view controller's view? Just like secret app

I think the ios secret app is very cool and want to implement its animation. But I don't know how to make it. That is when a cell in time line clicked by user, the cell expends to whole screen, but the other cells don't move. It seems that the cell becomes another view controller's view. When the user click the close button on the top left side, it scale small to it was before. Just like the photos show:
I thought its something ios7 view controller transition trick, but I didn't make it. Any idea? Thanks in advance.

iOS connect my view to popup on button press

I have two xibs, one is my title screen with buttons, the other is a more specific window that should come up when one of the buttons is pressed.
This isn't switching the whole screen, just a popup window, where clicking outside of the bounds of that window will make it disappear leaving only my title screen remaining as it was visible behind this popup view. This is similar to my understanding of "modal views".
Anyway I do not quite get how to connect it to the button on my title screen. I have the views made in IB ready to go. I'm not sure if I have declared all objects to satisfaction yet.
From what I understand I think I need a UIViewController or something, but its all a pretty thick fog of information right now
insight appreciated, or links to proper noob sources would be helpful
Does your title screen have a view controller (or is your app delegate the main controller object)? You will want to add an IBAction to that object, connect the button to it, and then present your other view controller modally (or in a popover) from there.
A popover will appear in a small window with an arrow, and tapping outside will close it. A modal view controller typically slides up into place, and you have to press a cancel button to close it. This guide explains how to use a popover. Using a modal view controller is simple if you have a view controller: [myViewController presentModalViewController:nextViewController animated:YES].

Resources