Moving a label without having it nest under a screen filling UIView - swift

I have a UIView implementing a GMSMapView which stretches to fill out the screen. I want a little label displaying text on top of this map on the top-right corner.
I managed to re-order the arrangement to successfully display it on top of the map while in the center:
But the moment I try to move it to another spot, it nests under Map Label and no longer shows up:
How can I prevent it nesting under the Map Label view?

First remove all constrains from the label, and then center the label in the middle of the View aligned perfectly. Then go to Resolve Auto Layout Issues and click Update Constrains after add Missing Constrains and run the app. Another way that I use stack the label and place in the middle and add the appropriate constrains. To add a Stack View select your label and click on the first icons horizontally placed on the PIN row.

Related

How to center an image and button to another button

I want to center an image and button to another button. I do not know how to do this. It would be appreciated if someone can show me through the storyboard interface and not code. Thanks
I tried selecting both and control dragging it to the button I want it to center with. However, it just center the button rather than both.
https://imagizer.imageshack.com/img923/2572/8M6NRu.png
As you can see, I want to center the lock image and already have an account button to the get started button.
You can't center a pair-of-views. So you need another view that does nothing but contain the lower lock-and-button, and now you can center that in respect to the upper button.
This use of an effectively invisible view just to make the layout constraints work correctly is extremely common, so don't hesitate.
You will need to pin the lower lock-and-button on all four sides to their superview, the new view that I'm talking about, in order to size the new view to fit them. Then you position the new view and you're all set.
In the storyboard:
In the running app:

How to set the scroll view position so as to display the new instantiated ui panel in the ui scroll view in ngui

My question is related to ui scroll view in ngui
I have a set of panels in a scroll view that move horizontally.
I use NGUITools.AddChild to add a new panel.
I position this new panel to the end of the scroll view.
The problem is that i want to move towards the new panel that was created and placed at the end of scroll view but i am not able to find a proper solution to this issue.
I tried to move the whole grid manually but then the scroll view would move to some other place leaving the camera's view as the offset values get changed when i move the grid manually.
I tried to move the camera but the same issue occurred.
I tried using UIScrollView.ResetPosition() but this actually changed the scroll views position to the top left corner i.e the first ui panel child in scroll view.
But i want to move towards the last ui panel child in scroll view.
Is there any class available that sets the position of the scroll view to a particular panel.
I want to move the panels or the camera whatever is feasible to display the panel i want to without affecting any offset values and the on drag values.
Thank you for reading.
You can use UICenterOnChild.CenterOn(transform target) to center the panel to a specific target: http://www.tasharen.com/ngui/docs/class_u_i_center_on_child.html

UIButton in custom UITableViewCell not registering tap

I have a custom UITableView, with custom UITableViewCells that are dynamic in height. I create the skeleton of the custom cell in storyboard, which includes (for simplicity) just a label at the top (static height), a label in the middle (dynamic height), and a label at the bottom (static height).
I have a tap gesture setup on the bottom label.
The problem I am having, is the tap gesture on the bottom label does not work (all the time). It seems to work when the middle label is shorter (2 lines), than when it is longer (2+ lines). If I move the label to the top, and anchor it to the top of the superview, the tap event gets registered every single time.
Has anyone else experienced this, and perhaps has a solution to this problem?
It seems to work fine if I add the label programatically.
Are you sure your bottom label is not occluded by the label in the middle? Labels have default transparent background, maybe your bottom label is visible but not accessible for tap gestures. Try downsizing your middle label or add tap gesture compatibility to middle label also so that you understand if it takes away the tap gesture from the bottom label. If this is case you can fix it by bringing bottom label to front
[tableCellView bringSubviewToFront:bottomLabel];

Scrolling by hiding scroller in GtkScrolledWindow

I have a gtkscrolledwindow object which sets to GTK_POLICY_NEVER for both horizontal
and vertical scrollbar. I have placed one button on each side of it. My requirement is
when i click left button all the elements should scroll left and vice versa for right
button. So, on what ways this requirement can be achieved.
This can be achieved by using Adjustment associated with the scrolledwindow. get the adjustment object from scrolledwindow and set the new value for the adjustment then scrolling effect will come into effect. within the scrolled window you can add any number of widgets....

Appending a scrollview (horizontal) to a view which has a scrollview (vertical) and two labels Iphone sdk

I have developed an iphone application which has 6 cards (icons with images) in the Rootview. Clicking on a card would bring another view which the image being enlarged (fullScreen). The Card View has a Flip button which shows the back side of the Card which contains some text. Different cards hold different text on their back. Depending on the text size the view will be scrollable. I used two labels: one for title of the text and and second label having the whole paragraph. I have placed a scrollview below the two labels for vertical scrolling.
When a nth card is clicked from the Rootview the selected card should appear. It works perfectly. I used a separate view to design the front view of card and a different one for the text on the back. The issue is when a card is opened and flipped to see the text, it should be scrollable horizontally too apart from scrolling vertically. I dont want to redo anything. I have placed the vertical scrollview and the labels on the view representing back of card. I added another scrollview and enabled its paging property and wrote code in the following functions.
scrollViewDidScroll:(UIScrollView *)sender;
scrollViewDidEndScrollingAnimation:(UIScrollView *)newScrollView.
But it is not working as desired. No scrolling works (even the vertical 1 which was earlier working fine. I mean when i combing the horizontal scrolling both stop working.
How do i allow vertical and horizontal scrolling to this view which has two labels.
I would appreciate your help...
Thanks in advance
I solved it.
I used a table view to hold the card back details. So i get vertical scrolling by default.
I took a scrollview which will hold as many number of tableviews as there are cards.
And it is done