view on top of tableview shows up below - objective-c

I have a on top of my tableview another view with 3 buttons on it. You can see my storyboard over here.
When I build and run. This view shows up at the bottom of my tableview. Someone has an idea how this is possible?
Kind regards.

Your UIView is subview of UITableView, to make it on top of the tableView, just drag it out of UITableView scope.

If you select the UITableView then in the Xcode menu Editor->Embed In->View
This will embed the UITableView in a UIView. You can then drag your UIView out from the UITableView and place it at the same level as your UITableView.

Related

UITableView inside UIScrollview Horizontal Paging Programatically

Good day,
I have a question about programmatically adding UITableView inside UIScrollView. The structure is like that:
UIView
UIScrollView
UIView(contentView)
UIImageView
UITableView
How can I add the UITableView programmatically inside UIScrollView so when I scroll horizontally to switch between UIImageView and UITableView. Note I am using Autolayout so I need to add constraints also. If it is going to be easier with storyboard please let me know how to do it with storyboard instead of programmatically
I used SwipeView it is pretty easy to use 5 minutes installation and did what I was looking for.

Move UIView above UITableView when user Scrolls Down

I have n UIView above my UITableView.
I would like to have the UIView moves up as if it is "pushed" by the UITableView when user scrolls.
I am wondering how do we create an effect like this?
SCREENSHOT - Before User Scrolls
SCREENSHOT - After user Scrolls, Please notice the UIView above it (Offers, Discover, Most Booked)
The view with 3 buttons needs to be taken as the header view of table. Take the outlet of that view.
[tableView setHeaderView:yourView];
You need to set this in the viewDidLoad of your view controller.

Navigation Buttons + UICollectionview on same controller?

I'm newbie with iOS and asking for direction.
I want to make a page which contains navigation buttons on top and when tap load different UICollectionView's as you can see on the app screen taken from "Fancy". Also buttons line have to be fixed on top while scrolling down. (just like in the screenshot)
Which is the right approach?
Base class to be UICollectionViewController and adding as SubView
Using UIScrollViewController?
etc...
Thanks in advance.
Base class should be UiViewController implementing UICollectionViewDelegate
UIViewController <UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
Create different NSArray for each Category of your project as datasource of UICollectionView
use UISegmentedControl for switching the datasource of UICollectionView and reload UICollectionView to display different content.
You can customise your Segmented Control as you wanted.
Implement UITabbarController for the bottom bar to enter any other views
There are a number of ways to go about this. The simplest would probably be to use a UIViewController subclass whose view contains a UISegmentedControl subview (for the navigation controls) and a UICollectionView subview for the content.

UIPickerView UIScrolling with view

I have a UIPickerView on a scrollable view with multiple buttons and textfields. UIPickerView picks values into two of the text fields. Now, the problem is UIPickerView is also scrolling along with the page. Can any one guide me how to keep the UIPickerView at the bottom and opaque on a scrollable page?
You need to add the UIPickerView to the superview of the UIScrollView (possibly the view property of the UIViewController that you're working in.
You might also want to extend the contentSize property of the scroll view by the height of the picker view so that all objects in the scroll view can be scrolled on screen and aren't hidden under the picker view.
Take another View on the top of the scroll view and put your UIPickerView into that so it is now independent to your UIScrollView like this:

Selection of UITabBarItem loading corresponding view

I have a UIViewController named "RootViewController" which contains a UITableView and a UITabBar (2 TabBarItems - Favorites and More).
When the View is being displayed, the TableView and TabBar are visible. Now I want to load an additional view when pressing the other TabBarItem (More). And backwards, but the tabbar should be available. (User can press Favorites)
How can this be done?
BR,
mybecks
If you want the UITabBar to be visible on more than one screen you should use a UITabBarController. That controller should hold your different UIViewController.
It's wheel explain in the documentation on how to implement that controller.