Is copy-paste of views in Interface Builder an unadvisable user behaviour? - ios

Background:
My workflow for developing interfaces for mobile apps depends on Illustrator and Photoshop. I'm not a fan of Interface Builder, nor am I impressed by the Android UI designer in Eclipse (haven't tried IntelliJ yet). It's awkward to take an experience of laying out UI from such apps, and translate into IB. Once in a while I try again to build a UI in IB, only to get bogged down in bad experiences.
The current problem I'm having is this:
When selecting a set of well-laid-out views within a View Controller's view from an iPhone storyboard, and then pasting into the corresponding View Controller view of the iPad storyboard, the views are all messed up. They get thrown all over the canvas, and the size manipulation handles are hidden because they're not within the bounds of the superview.
Is copying and pasting inappropriate behaviour in Interface Builder? Must I drag everything out of the library again?
Side note: I'm working on a 13-inch screen, and the iPad view is larger than the small area given to work with. I zoom out so I can actually see the whole thing, then select a component to adjust it, and find IB automatically zooming back in.
I've found question-answers saying the auto-zoom cannot be disabled, and so I have to just put up with that awkward UX.

Related

Interface Builder PREVIEW using IBDesignable and core graphics (drawrect)?

I have lots of views - sub classes (UILabel, UIVIew, UIButton etc) using core graphics (within drawrect).
These show fine within normal interface builder.
However they do not show in the preview assistant editor for the storyboard (where you can see how views should look on actual devices).
I've been doing some research and found posts suggesting prepareForInterfaceBuilder should be used. However this doesn't show in preview for me.
I asked this question some years ago, IB_DESIGNABLE, having views show in preview? however I can't reproduce this, I'm not convinced it did work back then either.
I'm still following the same approach, with a framework and that link shows my implementation.
I know that prepareForInterfaceBuilder should be used to do something different, to show something basic. Therefore I believe that core graphics won't work.
However, I can't even get a simple change in background color to work in the preview, although it does work in normal interface builder.
I would like to know if this is a bug (that core graphics can not be used in preview) or still a limitation in xcode?
At the very least I'd like to do something simple (like a change in background color). I have a lot of views and an impossible task to make auto layout changes.
Previously I was producing lots of screen shots, different devices, languages etc (via automation) just so I could see my auto layout changes, which is really slow way to work.
I can verify this is a long standing bug. Apple doesn't care. Custom view be damned. All those dollars spent for more broken Xcode functionality.
Android?
Daniel

GUI areas restricted by the iOS

I would like to be able to use the areas that are occupied by the iOS in my app, using javaFX and Gluon. How can this be done?
That means any javaFX controllers functions as expected. Now they are almost impossible for a user to focus. When I have another controller in the middle area of the screen that one works like normal.
On iPhone 6 you can press the top most area and drag down to get access to a menu. The same exact thing with the bottom-most area by pressing then dragging upwards. And I believe that OS related functionality to be the reason.
The touch event probably do not reach the app properly over these areas. I am seeking to be able to have controllers placed here and have them work just as they are in other places.
This was done by adding a VBox layout, with TextField and TextArea to Gluon Layer - and then adding it to Layers of a class extending Gluon View (Called "BasicView").

Understanding the use of views in a Multi-Device Project

This is the first time I have really attempted a Project using Firemonkey, with the Target Platform been Android.
I am finding it difficult trying to understand the workflow with the use of views been somewhat trivial, I just can't seem to grasp the concept at the moment.
I have successfully managed to get the Delphi IDE to recognise my device (Xperia Z2) so when building and running the Project I can see the app on my phone (although so far I am not too impressed, long black screens before anything showing and sometimes the app wont show at all, not to mention slow compilation and linking time).
The first problem I ran into is that controls dont appear on the Android device in the correct places. I added Android 5" Phone as a view as that would be the closest thing to my device, the controls on the Form Designer are aligned to how I want them, for simple testing I just dropped a couple of buttons that are centered in the middle of the form horizontally. When running and viewing the app on my phone however, the buttons are wider than the visible area of the phone, I tried the same with other views such as Android 4" Phone and it's the same. The controls appear lined up correctly on the Delphi Form Designer, but when running and viewing them on my phone they are not lined up at all, it feels like I need to guess where the controls should appear making views seem pointless, after all I cannot test on a multitude of devices and therefore if they don't appear on my phone as they do on the Delphi Form Designer what hope do we have? I expected that how the controls appeared in the view window is exactly how it should appear on my Android deivce but this does not seem the case.
The other view related question is, what is the purpose of the Master View? From my vague understanding you need views to design the layout for each Android device, does this mean then for each device view we have to constantly reposition and move controls independantly for each view? What purpose does the master view have, other than from what I can tell you can only delete controls from the master view and from each view use the Revert to Inherited context menu.
It feels like I need to guess where the controls should appear, the device view at Design Time seems rather inaccurate, surely how you look at the device view on the Form Designer is exactly how it should appear on your Android device?

IOS view without Xib

I've to create iPAD app and xib files wont have to be used. When I place the components such as text boxes and labels through code they would be a bit off and its kind of really hard to place them exactly as in the design.
Is there any way that would help with this. Like I would get to know what are the exact positions without the help of a designer.
If you have a digital version of the intended design, like an image from the designer or even a scan from a paper design, you can use this a background image in a UIView and lay out your components on top of them in a temporary Xcode project with a .xib file.
Once laid out, you can make a note of the screen coordinates for each component and code these in your .xib-less project.

Why does the iOS Simulator show only a blank view/window?

I'm new to iOS development. I used the Interface Builder to add text fields and buttons to my view. When I run the app, the iOS Simulator only shows an empty beige screen. What am I missing? The console doesn't show any error.
It is because you have not connected your view to your File's Owner.
To do this Right Click on the View, Control Click on the Oultlet of your View and drag it to the File Owner.
This shall solve your problem.
Cheers
I reckon it's because you have AutoLayout turned on in your storyboard, but haven't set any constraints.
Follow my instructions in the following article, to confirm if this is true.
AutoLayout problem
Basically, with XCode 6, if you have AutoLayout turned on, you must set constraints on every single control... otherwise your screens will look fine within XCode, but the controls in your screen could (and will) end up anywhere and in any size when the app is run.
It's like designing a beautiful webpage, then displaying it in an angry, drunk, disorientated browser.
XCode is really unintuitive, and unhelpful for beginners... but once you learn the rules of AutoLayout (along with its many quirks), it's reasonable useful.

Resources