#Hidden annotation to hide a controller - swagger-ui

I am trying to use #Hidden annotation for hiding a whole controller. when I put it in top of one of the api's it hide it from the swagger fine but when I put in top of the whole class it does nothing and not hiding all the api's. what I am doing wrong?
The code

Related

iOS PageController with tabs

I'm trying to implement something similar to Instagram's Search view that (I'm guessing) uses a Page Controller with tabs and a small scroll bar to track the position.
The tabs seem straight forward enough but what's the best way to implement the scroll bar? Is there anything built in or do I need to figure out how to track the position of the page controller and draw the line manually?

iOS Search Bar Goes Over View

The current setup I have is a UIView over a map view that's meant to encapsulate the search bar (to make it look rounded). However, the first time I click on the search bar, it animates over the view for some reason, and then goes back to normal, but every other time, the animation stays within the view. The images below visualize the problem. I'm not entirely sure how to get started on fixing this -- any tips?
I instantiate the search bar and search results controller programmatically.
normal view (search bar not clicked)
the first time you click on the search bar vs every other time you click on it
I think you need to add constraints to fix this issue. And if possible try adding your search bar inside a UIStackView and then add constraints to the stack view.

Using RealmSearchViewController with a UITableView

I'm developing my first app in swift, which has a table that shows data stored using Realm. I've managed to add stuff to the Realm and show it in a table. Afterwards I wanted to add search capability and stumbled upon these two guides: http://www.raywenderlich.com/81615/introduction-to-realm and https://realm.io/news/building-an-ios-search-controller-in-swift/. I would like to use RealmSearchViewController, but I can’t seem to fit it to my setup. I tried using a UITableViewController embedded in a Navigation Controller, but I need a button at the bottom of the screen, where the user should tap to add an entry to the list. I tried using a tableFooterView with a button, but it can only stick to the bottom of the table and not the bottom of the screen. I also tried using a Tool Bar and a Tab Bar in the Navigation Controller, but it doesn’t show as the table takes up the whole screen.
What I would like to achieve is something like Airmail for iPhone, where there’s a Tab Bar at the bottom that is hidden when the user scrolls. Above the Tab Bar I’d like a table with content from the Realm, and then a Search Bar, which is directly below the Navigation Bar. I’d like to use RealmSearchViewController as it makes searching a lot easier, but how can I adapt it to be used with a Table View and not a Table View Controller?
Any other suggestions as to how I can achieve the same functionality?
Thanks!
My recommendation would be to create a parent view controller that arranges the the view of RealmSearchViewController so that it doesn't cover the entire screen, and then arrange a UIButton at the bottom.
You can do this in a Xib/Storyboard by arranging a view and a button with autolayout and then simply add the view from RealmSearchViewController as a subview to the view in this parent view controller.

iOS Customizing PKRevealController to work like Google Maps

I'm trying to imitate the new Google Maps app where there's a button with 3 dots that you can pull to the left to reveal a new view controller on the right side with some settings for the app.
I have the default implementation of PKRevealController working..but since my front view controller has a map that takes up the entire screen's bounds... i can't tug left (instead, the map moves). I know it works because I have a button on the map that I can tug to the left to reveal my view controller that's on the right.
How do I change the way PKRevealController works so that it will only show a right view controller if and only if a tiny button is pulled left? Since I have multiple buttons on top of the map... is there a way to disable a few of them so they cannot be pulled left..but only leave one button that can be pulled left? Or is there any other solution?
Thanks!
I figured it out. I set the options for the PKRevealController as follows...
NSDictionary *options = #{
PKRevealControllerRecognizesPanningOnFrontViewKey : #NO
};
and then I set the gesture panning property on my view object of the view controller. The below shows how to add the gesture panning property to a navigation bar.
[frontViewController.navigationController.navigationBar addGestureRecognizer:self.revealController.revealPanGestureRecognizer];

iOS load view from specific position

Hei guys.
What I am trying to achieve is have my search bar behind the navigation controller just like in the sparrow app. So when you scroll down the search bar is basically part of the view.
The first picture is the view when it's first loaded. The second one is after I scrolled down.
Do you know any way I can achieve this? I was thinking of having the search bar as part of the view and just load the view form the point that's just under the search bar. But I don't know how to do that. Any help would be much appreciated. Thanks.
I agree with #holex's comment if you're using a tableview. Seems silly to re-implement.
However, in the unlikely event you're not. You could just use a UIScrollView for your content and place the search bar at the top, and adjust the content offset accordingly. So it would appear as if the search bar has animated from under your navigation bar.
Here's a link to the UIScrolView class page on the dev site

Resources