On iOS 7, the the Weather app's list of cities seems to be using table view cells whose content is selectively clipped by the status bar:
Each cell has an animated background (clouds in my screenshot) which does show underneath the transparent status bar. However, the text (Montreal 12) is clipped by the status bar.
Anyone knows how to do this?
Related
I have an app which uses EMPageViewController to display a set of onboarding slides. My understanding is that the underlying scroll view is using paged mode to display slides.
Upon update to iOS11, I see that suddenly the slides follow the finger, so they are draggable and bounce up and down. I expect paged scroll view to be scrollable horizontally only.
How can I restrict paged scroll view to horizontal scrolling only in iOS11 ?
I tried this but it did not work
pageViewController.scrollView.alwaysBounceVertical = false
This fixes the issue:
if #available(iOS 11.0, *)
{
self.scrollView.contentInsetAdjustmentBehavior = .never
}
The behavior for determining the adjusted content offsets. This
property specifies how the safe area insets are used to modify the
content area of the scroll view.
contentInsetAdjustmentBehavior is new from iOS 11 > and the default value is automatic.
Content is always adjusted vertically when the scroll view is the
content view of a view controller that is currently displayed by a
navigation or tab bar controller. If the scroll view is horizontally
scrollable, the horizontal content offset is also adjusted when there
are nonzero safe area insets.
Which made some of my UIScrollView scroll more than they were excepted to.
I've got a scene in my iOS app in Xcode in swift.
The scene has a View > Scroll View > ContentView (with text fields, labels, images etc.).
At the bottom is the tab bar and there is a grey area above (like another tab bar but empty).
The question is how to remove the second (upper bar)?
Hope the picture clarifies:
Thanks for all the answers in advance!
I am having trouble determining how to adjust for the status bar in iOS7. My view controller has a tableView, and I want the tableView to start under the status bar. Currently, it is being overlapped by the status bar. (The label at the top is a headerView in the tableView).
I have set the properties on my view controller via IB as follows:
automaticallyAdjustsScrollViewInsets = YES
edgesForExtendedLayout = UIRectEdgeNone
Is the expected behavior for these settings for the status bar to overlap the tableView? Or am I missing something? I have tried enabling auto-layout, and changing the project settings to only support iOS 7.
The solution is to check "Under Top Bars" and "Under Opaque Bars" in the Extend Edges section of IB.
I have a UIView background image that I want to use for my view.
Now, on top of this image, I want to have buttons and position them relative to what I see in the image.
The problem is, these buttons were already added to the view before the background image was added. So now when I put the background image, entire view is background image and I am unable to access the buttons underneath it in Xcode.
Is there a way to tell Xcode that I am not interested in the UIView but actually the buttons that appear underneath it?
Check - (void)sendSubviewToBack:(UIView *)view in UIView
Would be something like
[self.view sendSubviewToBack:backgroundImageView];
I am developing a web application that uses a plugin to display some native Content. I create a NSView(say A) and return the CALayer of the NSView to the browser for hosting on the browser window. Inside this NSView I host a NSScrollView; The ScrollView contains the actual document that needs to be scrolled(the size of the document is big enough that both the horizontal and vertical scroll bars need to be displayed). I am setting the bounds of the Host NSView(A) as the frame size on the NSScrollView properly; Also I made sure on the ScrollView I am setting setHasHorizontalScroller and setHasVerticalScroller as YES.
Though the veritical scroll bar is displayed in the viewer, the horizontal scroll bar is not getting displayed. I want to know what the error I am making and why the horizontal scrollbar is not displayed. Any clues/suggestions on this is greatly appreciated.