Touchable info (i) button on top of Scroll View - iphone

Is there better (framework built in) way to add small "touchable" round info button (i) on top of scroll view? Theoretically I think there should be container view for button(UIControl or UIImageView with png?) and scroll view.

Simply make your information button float above the scroll view by adding it to the scroll view's superview, then ordering the views such that the information button resides on top of the scroll view. You'll retain scrolling capability, while still catching button touches.

Related

Is it possible to scroll a Scroll View layered on top of a UITableView?

I have a child View Controller within a Container View that hosts a vertically-scrolling UITableView. Tapping a Button expands a separate View that covers the UITableView in the child View Controller. This new View contains a vertically-scrolling Scroll View. No matter what UITableView settings I change, I am unable to scroll the Scroll View unless I remove the UITableView entirely.
I am currently porting my fully-developed Android application to IOS, and my experience with Android Studio leads me to believe that this is an issue with the UITableView stealing focus from the Scroll View.
In short, how may I temporarily remove focus from the background UITableView to allow the overlaid Scroll View to scroll?
With Scroll Views up until this point, I have been setting the bottom -> Superview constraint to priority: 249 since I was having issues setting the contentSize. For some reason, having a Table View in the background disables this effect. My guess is that this happens because the Table View is forcing the Superview to anchor based on its own constraints, and therefore the Scroll View can no longer adjust based on low-priority constraints. Changing the Equal Height parameter of the Scroll View -> Superview to a proportional relation (x2) has temporarily addressed the problem.

Action sheet in an UIScrollview

I have a full screen UIScrollView to display my image. And the scroll view recognize long press gesture. After long pressing on the scrollview, an action sheet shows up. If i add the action sheet to the window, it will not rotate while I am rotating the screen. If i add it to the scroll view, it rotates but not that good when the scroll view has been zoomed or scrolled. Is it possible to rotate the action sheet well regardless of the scrolling and zooming of the scroll view?
ps. the scroll view is directly add to the window by "self.view = myScrollView;"
Adding the scrollView to the rootviewcontroller or the parent view on which scrollview resides would be better and solve you problem.

Fix UIButton on top of UIScrollView

I'm trying to figure out how to overlay a UIButton on top of a UIScrollView. Basically the user would be able to use the scrollview normally. But a button in the top right of the scrollview would remain in a fixed position. Any thoughts?
Don't add the UIButton as a subView of the UIScrollView, but instead of "self.view"
In the InterfaceBuilder there will be a Hierarchal list of items you put in your view, drag the button from being a view belonging to the scrollView to belonging to the view containing the subview.
Your view hierarchy will look like the following
mainView
|
----Button
|
----ScrollView
Instead of
mainView
|
----ScrollView
|
----Button
basically It means both your button and your ScrollView will both be subViews of the exact same mainView. If your scrollView is the mainView put an empty UIView above the scrollView and insert the UIButton & UIScrollView into that
IB is a little finicky when dropping new views directly on the 'fake' interface. What you will need to do is go over to the left in the list of views and select your button view. Now drag it up to below the 'self.view' or whatever is your top level view.
YOu should notice as you raise it up and down in the list that a light blue line will appear. The width corresponds to 'subview' or 'parent' view connection. Play with it a bit to see the difference.
When you feel comfortable, you should be able to place the Button in the 'self.view', not as a subview of the scroll view. Additionally, if you want it to appear on TOP (physical 'Z level') you will need it to be below the scroll view in the list. ( this points out a subtle problem with CStreet's solution)

implement UIScrollview on a particular area of screen?

i am creating an app which has two UIImageViews at top and bottom of the screen and few customs buttons in between them which i am using in a UIScrollview so that user can scroll through them while the two images remain on top & bottom as they are.But when i use the scrollview the buttons scroll over the two UIimageview instead of just scrolling between them or hiding behind them as users scroll down..how can i make the UIImagviews remain on top of the buttons in UIScrollview??
I assume that you use the Interface Builder...
Make sure that:
The frame of the scroll view is between the image view
The Clip subviews of the scroll view is checked
The image views appear after the scroll view in the views hierarchy (if not then you can just drag them inside the hierarchy)

Is there a way to achieve parallel scrolling of two tableview?

Let's say, i have two tableview inside a scrollview. After i scrolled up & down tableview1, and then touch and swipe to scroll the scrollview horizontally to tableview2, i want tableview2 to have the same vertical (up & down) position as tableview1. is there any way to achieve that?
thanks
You can put code in the UITableViews' viewWillDisplay: methods that grabs the other table view's scroll position (called a "content offset" in scroll view parlance) and calls setContentOffset:animated:. This way, whenever either scroll view will appear on the screen, it will automatically scroll to the other view's position.