uitableview not reload again in half view like facebook Half view - uitableview

I have made an application, in which I have used uitableview in Half view like facebook, when I go to half view using swipe, then uitableview does not reload, but it reloads when I run it first time,So if anyone knows about it, please tell me.
Thanks

I have subclassed JASidePanel and in that subclass I override a method as show below:
- (void)toggleLeftPanel:(id)sender
{
[((MyLeftPanelViewController *)self.leftPanel) myReloadMethodInMyLeftPanelViewController];
[super toggleLeftPanel:sender];
}
This works when using the left navigation button to navigate to the left panel, but I think a similar approach would work for swipe. I figured this out by looking in the header file for JASidePanel and then tracing the code.

Related

UISearchController's UISearchBar shifts incorrectly and jumps when UITableView is scrolled

In the video, it's a little difficult to see what's going on, so I'll try to explain it.
https://youtu.be/yOrCJB9yZlg
I have UIViewController with UITableView inside its root view. Binded via Autolayout (there is no difference how it's binded: to SuperView or to SafeArea).
SearchBar added like this:
let search = UISearchController(searchResultsController: nil)
self.navigationItem.searchController = search
When I slowly scroll table, the transition between large navbar and compact navbar, and then animation of showing in and out of searchBar is too fast. Searchbar jumping in/out of navbar instead of smoothly opened/closed; navbar transitioning is jumping between two states, large and compact, without smoothly passes through the middle half-opened state while you slowly moving your finger on screen, like in system apps (Mail, Phone, Messages, Contacts etc).
I made the example from an empty project to demonstrate the issue; there isn't any changes to navigation bar logic, or any logic at all. Just two new VC's and this odd behaviour.
If i create xCode's "Master-Details" project example and add UISearchController to it, it will work properly. I assume its because they used UITableViewController instead of UIViewController + UITableView inside.
What the reason of this behaviour and how to fix it?
I had the same problem with the search controller transition and tableview.
like this its flickering or tableview was jumping. The search controller was on the navigation item.
The key solution is to remove safe area guide from your view controller and assign top bottom left right constraints to your tableview. It will be smooth like this
What you have done is correct. Did you try running your code in a device? Feels more like a glitch in the simulator. I tried what you tried and it works fine for me in the device. Whereas the glitch occurs in simulator.
Refer to this article. They have explained step by step process.
This is a known problem and your code seems fine. This problem was already discussed here.
Problem appears when you're using UIScrollView or its subclasses with large navigation titles. It doesn't work. Problem disappears when you use UICollectionViewController or UITableViewController instead.

How to make UITableView header to show only when dragging down table view

I have an UILabel that shows me the current date added to the table view header. When the app is running you can see the header right from the start.
What I am after is when the app starts to not see the header, only when you try to drag the table view down, to reveal the label. And when releasing the header should be hidden again.
I think Snapchat uses this technique in their Stories screen.
Any ideas how can this be achieved ?
I'm thinking something with setContentOffset when the app starts to move the table view on top of the header. But then how do I do I know when the table view was dragged and released ?
You are correct that you can use setContentOffset to move the tableViewDown. You can implement UIScrollViewDelegate method scrollViewWillEndDragging(:withVelocity:targetContentOffset:) which will tell you when the user lets go of the tableView and then call setContentOffset(:animated:) to animate the tableView back to its initial position.

TableView issue (weird Visualization)

I have a class (movieTable.m) with TableView populated with many cells.
As i Clicked one of them, the navigation controller brings in the other scene done in the StoryBoard.
When i get back, still with Navigation Controller, i find the TableView moved little bit down.
As I debugged the Hierarcy i found that UITableViewWrapperView is scrolled down from UITableView.
Edit: The funny thing is: if i put a UiSegmentedControl in the UiView the issue disappears.
Why this? i didn't tell the code to move it. Maybe I'm getting wrong with the timing?
so to making clear the ideas, there's two images:
Hierarchy before/after changing the scene
The Code if you want to see it is in this following GitHub: GitHub
Thank you all for helping&hints.
this worked for me
add
self.automaticallyAdjustsScrollViewInsets = NO;
to your viewDidLoad of the moveiTable.m

UIPageViewController with docking/pinning functionality

I've been using UIPageViewController with transitionStyle UIPageViewControllerTransitionStyleScroll in order to be able to easily move between views in my app.
I'm looking for a bit more functionality that I won't get from the UIPageViewController so I'm looking to make my own solution - perhaps still a subclass of UIPageViewController.
To explain the extra functionality I'll provide a scenario & a diagram:
In A the app is currently showing the first view controller. I then drag from right to left which will of course start to show the second viewcontroller as shown in B. If I stop panning before the point where the UIPageViewController decides whether or not to show the second view controller or go back to the first one I'd like it to instead show the second viewcontroller (taking up one third of the screen) instead of hiding it completely.
If I was to keep panning a bit further beyond the halfway point and then released I'd like the second view controller to take up two thirds of the screen, while the first view controller takes up one third.
That's essentially it. I'd appreciate any advice on how to go about doing this. I'm thinking I'll subclass UIPageViewController and override the delegate methods, but I'd really appreciate any advice on a better solution.
Many thanks
Maybe this could give you a hint or and inspiration. >>
http://www.raywenderlich.com/78568/create-slide-out-navigation-panel-swift

uitableview in uiviewcontroller disappears in xcode 5

I am building an ios application for iPad, I used uitabbar to show some uiviewcontrollers, I added in some of these uiviewcontrollers an uitableview. Now when I first load the application the uitableview appears and show my data. if I opened an uiviewcontroller that is not in the uitabbar and return to the tab bar the table disappears !!! then if I choose another tab from uitabbar tabs and return to my tab (the one which has the uitable that disappears) the table show up !!! anyone know how can I fix this problem ?
I think it is an Storyboard/layout issue !!
any help will be appreciated, thanks
Sounds to me like you are doing some kind of initialization in viewDidLoad which is not called again when you come back from a child view controller.
One quick fix could be to move that code to viewDidAppear method. If you further want to understand when either of this method was called or not, you could throw in some NSLog statements in each.

Resources