Gap between UIView containing table view and tab bar - swift

I am experiencing a UI issue since iOS 15 where there is a gap between the tab bar and my UIView(UIViewController's view).
I tried to hide the toolbar as advised from several posts but this is still not working.
For more details, I created a mockup of the actual issue.
I have already set the tableView.sectionFooterHeight to zero which has therefore diminish the space but there is still a gap.
I am unsure what should be done next as no other solution has been found yet.
Your help or advise will be greatly appreciated.

I solved this issue.
Thanks to this post: UINavigationController as a child of UITabBarController leaves a gap
Basically, I added those settings in the ViewControllerOne:
edgesForExtendedLayout = UIRectEdge.Bottom
extendedLayoutIncludesOpaqueBars = true

Related

Adding ViewController's View as subview to UIPageViewController in iOS 8 gives weird UINavigationBar while show/hide

I have been working on a project where I needed to show list of images with zoom / swipe feature as presented view modal. I created custom ImageViewer using ContainerView in which I have added UIPageViewController. And on demand, I added ImageViews over the UIPageViewcontroller's view. When user taps to imageView, the top UINavigation gets shown and hidden on toggle basis.
Everything worked as expected in iOS 7.1 and less. However when I tested the functionality in iOS 8 devices and simulator, the ImageViews were not added to UIPageViewController in TopLeft ( beneath UINavigationBar ). It is added below the NavigationBar as shown in bug_iOS_8.png below.
Once I touch the buggy view, it repositions itself to correct position as in image expected.png below.
I have created and tested the issue in sample project and it seems it is bug in iOS 8 itself with UIPageViewController. I went through couple of questions regarding weird behavior of UIPageViewController too. Please check the sample app here and kindly let me know if anyone has any hints on what is going on.
Thank you for your time and help.
PS: BTW I am using following version of Xcode.
Update 1:
I have tried as per the pin suggestions. However, the problem aligning is with the main view of UIViewController rather than its subview. In below image, Yellow is main View of UIViewController and red one is added subview, I added pin to "red" on in reference to superview "yellow" one. Please check following screen shots.
On startup.
After touch on screen.
Kind Regards,
check in storyboard for particular viewController and make sure Extended Edges >> Under top bars is not selected.
I had a very similar issue and the way i fixed it was select the view being added to the UIPageViewController in the storyboard and selected the pin options. Below in the image you can see the Constrain to margins options, make sure you unselect that. Also when choosing what view to pin it to make sure you select the superview and not the Top Layout Guide.
Curious are you hiding your nav controller like this?
[self.navigationController setNavigationBarHidden:YES];
also if you have multiple Nav controllers, you might need to check you are referencing the correct one.
If you want it to be hidden when you present the ViewController you should move it to
-(void) ViewWillAppear{
}

iOS7 issue with container view

EDIT**: Although someone has decided they would like to down vote without a reason I'm going to leave this up. I noticed that in viewDidLoad of my view controller container, the content view I setup was the same size as in IB. When I later tried to load other views with my view container controller, the content view had changed it's bounds. Hope this helps anyone else that has a similar issue. The excepted answer worked. Since this is a build for iOS 6 a simple check of OS version made this an easy fix.
I have a strange issue that seems to be iOS7 related. This is an iOS6 targeted app. I have followed apples own docs about creating custom container views here. The problem I'm seeing in iOS7 is the first view I load is within the proper bounds of the content view i have defined, the other two are filling the bounds of the entire screen so it hides under the navigation bar with my segmented control. I defined the view I'm loading in a separate view controller in storyboards. Is there some sort of constraint that is working against me?
I should add that I have noticed the content view I defined in my container controller is actually changing it's size after the initial view is loaded. I'm at a loss of how to stop iOS7 from changing that UIViews frame size when it really shouldn't be changing.
Here are some screenshots. Code is pretty much the same as in the apple docs, have tried a few other ideas, defining bounds etc. but I think it has something to do with IB since the content view is changing its bounds. It appears to only be doing so in iOS7.
There is actually a proper way to fix this,
Set edgesForExtendedLayout to UIRectEdgeNone for the view under the tab bar.
Of course, I might've just looked at the pictures and assumed this was your problem...sorry if its completely unrelated..
That's a known 'issue' in iOS 7. Since you can now have a blurred look through the UINavigationBars, UITabBars, ... This also causes issues in native apps (e.g. the Photos App) or APIs.

Iphone view touch issue

I have issue with view touch in iphone in my application
the bottom part of my application do nothing like following.
This are two images so you can get the idea. i am not able to interact with this bottom part . and in all view of my application.
is anyone face this issue?
thanks in advance
Ok I solve the issue
if any one facing the same issue what i had just take care of following things:
1)Make the parent view's Autosizing property to true like this:
You can find it in size inspector.
2)For child view just do this.
self.vwTextFont.clipsToBounds=YES;
here vwTextFont is my tableview as you can see in above image in question part and its parent view is vwTabBar.
so I perform first step to vwTabBar and second step to vwTextFont.
Hope this will help.

Oritentation issue in landscape (iphone)

Good day!
I have a view which i forcefully landscape. but the problem which i am facing is that the navigation bar buttons are somewhere else but i have to click few steps (inches) back to let it act. e.g.
if button is at frame
0,0 then i have to click at 50,0 to go back. i am attaching screenshot, if some one could help me in this. Please help
Thanks & Regards
Without providing the code (or the entire project), it is unlikely for anyone to tell you exactly what is wrong.
...Unless this is just a frame/bounds issue. Make sure they are set to the proper values. The frame is the area where your view is displayed, and the bounds is the area where your view will accept interaction.
How did you force the screen in landscape? The usual way is something like the following (in any UIViewController subclass):
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
If you forced it any other way, that might be the cause of your issue.
This may cause due to no Auto resizing You will only have to do is goto Layout in Interface Builder then Live Auto resizing.
OR
By selecting all the components one by one hit cmd+3 Then there is a panel named autoresizing only select lines in inner square and deselect outer one if any
Only then your missing block will be shown and no button problem will be there
Cheers

Removing Divider Line from UISplitViewController

Guys, I know a similar question exists but the thread seems to be inactive, and I really would like this question to be answered. It's been annoying me for a few days now.
I'm wondering how to remove the divider line between the Master and Detail view in the UISplitViewController. I know its possible to remove/hide/cover it up because I see some apps in the store without that line.
I have tried setting backgroundColor to clearColour on my views but to no avail. So SO community, you're my only hope!
It doesnt look a UISplitviewer instead, you can have own views. For example, you can have 2 views in a view controller, where you can apply the design you needed for the views.
There is nothing in the documented API that allows you to do this. It's mostly playing around with images using an UIImageView to work with that line.
Actually you can't remove the divider between the master and detail view. If you want to hide any one of the view, you can make the view height and width as 0,0 so that the other view will fully occupy the screen