Xcode 6 moving views instead of rotating in Debug View Hierarchy - xcode

Is there possible to move the views instead of rotating them when dragging around in the Debug View Hierarchy pane? It zooms in the center by default but I want to see some details of a view in the bottom part of the screen.

I don't know how could I not figured this out sooner. Using a Magic Mouse, simply swipe on it (scroll) horizontally or vertically to move the entire View Hierarchy.

Related

Unwanted grey area when simulating iPad Xcode 11/SwiftUI

Question: Can someone identify why I am getting the extra grey area shown in my add item (top screen in screenshot) and how to eliminate it?
I have tried manually setting the size of the background object, removing and re adding constraints, clicking all the Xcode generated solutions for handling the autolayout errors shown below, setting the presentation setting to full size ala this answer all to no avail; it refuses to be consistent with the main menu screen (bottom)
Context:
Running Xcode 11...I have two scenes in a generic barcoding app, the main menu and the add item scene, and I am designing with iPad's in mind. With the size class for ipad pro 9 (wR hR) and set to landscape orientation, my add item scene has a huge amount of gray area bordering the visible content, unlike the main scene (though there is also a little grey area in portrait)
Figured out what was causing my problem; was using the wrong form of segue between screens, per this answer, in my case, a modal segue when I should have just been doing a show segue. Deleting and adding show segues with the presentation set to Full Screen in the destination views Attributes inspector did the trick.

Xamarin Forms label animation at bottom of screen

I'm essentially making a 'shopping cart' UI and I want it so that when the user hits the 'Add' button, a little tiny box-label appears at the bottom of the screen that says 'Added Item' or something like that.
My question is how to do that with my current set up. I am currently using a nested Grid inside of a Scroll view for the main content of the page. I want the box-label to fade in at the bottom of the screen and stay located at the bottom of the screen ontop of everything else even if you scroll, until the animation fades.
Now i figure it doesn't make sense to add it into the grid since the grid's end will be out of view in the scrolling part of the scroll view, and same for the Scroll View. I am considering nesting the entire scroll view inside of a stack layout but i fear the button will just be located at the end of the stack layout under the scroll view instead of on TOP of the scroll view. How do you recommend I achieve this effect?
I prefer not to use a custom renderer if possible due to my lack of experience in the three separate platforms.
Thanks
Make vertically oriented stack layout. When you need to add you animation add it programmatically to the stack. When it finishes remove it from stack. Your scroll view will not affect animation

UIScrollview scroll not working

UIScrollview scroll is not working when i tested application in device (iPhone 5), But scroll is working properly in iPhone 5/5s/6/6 Plus simulator. I am developing application using Xcode 6 and UIStoryboard with AutoLayout.
I set the top, bottom, left and right constraints of UIScrollview with relative to Superview. And i also set the constraints of every UIControl which is in the UIScrollview.
Has any one have solution regarding this issue?
Please see below screenshot for reference.
It's probably easiest to have the scroll view contain a single view, which then contains all of your scrollable content. That single view should be anchored to all 4 sides of the scroll view, and if it's only meant to scroll vertically (which is what your screenshot makes it look like), then set the content view to be the same width as the parent of the scroll view.
To make sure an UIScrollView scroll, you have to check
Size
Your content View is bigger than your Scroll View. If you want it to be scrolled vertically, make sure its higher; horizontally, wider.
Constraints
Make sure your Scroll View is pinned to its super view, Top, Bottom, Leading, Trailing.
Make sure your Content view of Scroll View DOES NOT have CenterY constraint set to Scroll View, cause that'd make content view stuck with Scroll View and it'd never be able to scroll. (That happens to me the last time I was stuck)
Interface Builder settings
Make sure the check in Interface Builder under Scroll View is checked:
Scrolling section, Scrolling Enabled.

Superview not resizing with subviews

I have a window into which I horizontally add two subviews. Into each subview, I place a variable number of subviews made up of a vertical slider, a text field rotated 90 degrees and placed to the left of the slider and another textfield, placed just under the slider. The slider subview's constraints are done in code, the parent views are both done in IB. When I add more slider views to the left window than the subview can handle in its default size, it resizes horizontally and forces the window's content view (and window) to also resize horizontally. Great, that's just what I want. But if I add more slider subviews than can fit in the right subview, they just get squeezed together and the subview does not expand as the left. I layout the slider views using code with this category converted to support NSViews, instead of UIVews:
UIView+AutoLayout1: https://github.com/jrturton/UIView-Autolayout
The constraints for the left and right subviews are more or less the same. I can't figure out why the right view does not resize as the left view does.
Here is a link to a sample project that demonstrates the problem:
SliderTest
Some someone help me out with this?
Also, a secondary question as I think my slider view could use a little work:
When a view is rotated using setFrame(Center)Rotation, do the top, right, bottom and top edges remain along the same edges or do they reflect the new orientation of the rotated view?
Thanks
I found the problem. The constraint between the left view and right edge of the window was fixed at 233 instead of >= 233. I had this at some point in the past, as I was adjusting the constraints to achieve the desired behavior and just overlooked this one through the troubleshooting process.

NSScrollView with sticky top, left and bottom 'headers'

I'm trying to create a timeline control in Cocoa. This is what I am trying to achieve. It's basically a standard timeline design.
However, I don't know which approach to take. The problem lies with the top ruler, the left track list and the bottom audio waveform display. These three parts need to always be visible and 'stick' to the edges. The ruler and audio waveform should only scroll horizontally, while the track list on the left should only scroll vertically.
For the top ruler, NSRulerView seems appropriate since it's just a ruler.
For the left view and the bottom view I don't know which route to take. I've played with using a wide vertical NSRulerView for the track list. This works but creates additional problems. For example: the top ruler appears above the track list.
I've composed four options so far:
Forget NSRulerView and draw everything custom in the document view. This seems feasible but sidesteps built in NSRulerView functions. Also, I need to find a way to shorten the scrollbars so they don't overlap the side and top views.
Use NSRulerViews for the top and left side. The bottom side will then probably be drawn manually in the document view.
Place the left view outside the scrollview and manually scroll it up and down by linking it to the main scroll view. Use NSRulerView for the top, manually draw audio waveform in document view.
An NSScrollView embedded in another NSScrollView. The outer handles horizontal scrolling, the inner scroll view handles vertical scrolling. Possible I think, but it seems hacky.
So my question boils down to: Which route to take?. Can anyone shed some light on this issue and point me in the right direction?
What I understand:
You want a view to the left of an NSScrollView which scrolls vertically with the NSScrollView while ignoring horizontal scrolling.
You want a view below an NSScrollView which scrolls horizontally with the NSScrollView while ignoring vertical scrolling.
You want rulers.
To achieve this task:
Use 3 separate scroll views which do not overlap and donot inherit one another.
Activate rulers in whichever view(s) you would like them to appear.
Synchronize the scroll views (so that when one scrolls, the other scrolls accordingly).
How to synchronize scroll views is in the help. See User Experience > Controls > Scroll View Programming Guide for Mac > Synchronizing Scroll Views. This is also indirectly linked in the header of the help guide for NSScrollView.
If you want the three scroll views to be contained within an NSSplitView for resizing simplicity, then a fourth view must be added to consume the unused corner (good place to put controls). Since an NSSplitView can only be split vertically or horizontally, you will have to create an NSSplitView containing 2 split views with each of those split views containing 2 views that you actually see (splitting in one direction and then the other). The resizing of the split views will have to be synchronized in a manner much like the scrolling is synchronized to retain a straight cross of all four views.

Resources