Xcode Buttons overflowing screen - xcode

I am trying to create a simple keypad in Xcode, using swift. I set up my keys how I want them to look, but when I run it, half of the buttons are off of the screen. Depending on the simulator, it can be pretty bad.
I was looking at this project:
https://developer.apple.com/library/ios/samplecode/UnitTests/Introduction/Intro.html
It is a simple calculator application with a bunch of buttons. When I run this app, the buttons do not flow off of the screen, no matter which simulator I use. I thought that this would have something to do with constraints, but there are no constraints on any of the buttons.
Can someone please tell me what it is about this app that keeps the buttons from flowing off the right edge of the screen? I've spent the last hour comparing it to what I have, and I cannot find a difference.

Related

How to drag the iphoneX simulator?

When moving the iPhoneX simulator I have tried clicking and dragging at the top, bottom and both sides and even all the corners but sometimes it works and other times it does not.
Why is this so random?
Where is there best place to click seeing as though there is no discernible bar like in other Mac applications
Putting this question up because it has been frustrating me for ages and maybe it will alleviate someone else's stress out there in dev-land.
So trick question actually because you can click and drag from anywhere, BUT the trick is dragging in the direction away from the simulator first then you can drag it wherever you like.
The problem here is when you click and drag towards the screen first it gets picked up as a swipe event. Thats what you want to avoid.
WRONG
RIGHT
Anyways hope this helps somebody.
Happy coding :D
If, like me, you can't get the accepted answer to work, choose the Window > Show Device Bezels menu item. The virtual device will get a normal window title bar which you can drag around.

iPhone 6(s) plus not scaling new application correctly for some users

I have a brand new Swift 2.0 XCode 7 Storyboard based application.
Target is set to 9.2. I'm currently supporting any device with GPS that can run ios 9.2
I started with the Tabbed View Template and I'm working in wAny and hAny and a single Storyboard.
It works fine in the simulator on a bunch of phones, both orientations and works fine on my 6s plus, 6s, 6 plus and a 5.
But for some users the scaling is wrong and everything comes out squished.
Even in landscape mode the TabBar Icons are very close to each other.
Narrower than even on my 6s plus in portrait.
I believe this is caused by my application not having a Launch bitmap.
My understanding is there are two ways to implement this.
Launcher .XIB/.NIB with half a dozen specific sized bitmaps attached. Or a StoryBoard Launcher with ... exactly what.
The "Or StoryBoard" is a little vague. But I wanted to keep things using the modern approach since this app is new and targeted users tend to have the latest device.
So I created my Launch Image set and tried to attached it to the UIImageView in the Launcher StoryBoard. It won't list items that are tagged as "Launcher Image Set". It will show other Image Sets and Icons. But not the ones specifically for Launcher. It shows an "L" in the xcassets list next to the Launcher Image set. I believe I have the build project setting set correctly and it looks perfect on many of the same exact devices.
After some digging, I read that if you use the "StoryBoard" method you don't need the 6 or so bitmaps anymore. You can put anything in the Storyboard Launcher View and treat it just like you would treat your main storyboard.
So I did that. I just centered a small image.png file in the View of the Launchers Storyboard. Works on all simulations and my iPhone 6s plus. I did not pin it to the edges because that would mess up the aspect ratio of the image.
A very small set of users still have the issue and one of them even uninstalled and reinstalled.
I tried playing with setting phone Zoomed, Normal, Text Size, Bold etc. They all work. Users also don't have anything out of the ordinary on these system settings.
So first, do I need the 6 proper sized bitmaps or not? I read conflicting info on this.
If I want to use the 6 images on a storyboard how to I get them in the UIImageView of the Launcher StoryBoard if they won't list? Should I put them in a regular image set. Does the "Launcher Image Set" only work for the for the Launcher.XIB?
If it's not the Launcher window, what else could it be causing this?
I know I could create a XIB/NIB with the 6 bitmaps. But that seems like I'm going backwards and I don't care about old OS versions or older phones.
I think I found my answer. When using a Storyboard Launcher you cannot use a "Launch Image Set" for your Launcher Storyboard. You have to use an Image Set.
This is the best Video I found that covers it A-Z.
https://www.youtube.com/watch?v=Vz6tCgXgZFo
It also didn't fix my initial problem. Which I'll post separately. It scales correct in Portrait but not in Landscape for hand full of users. Using the same hardware as others that it works fine on.

How to animate basiceditfield in blackberry?

In my j2me blackberry application, I want to open editfield to enter text when user clicks on search icon. I have search icon added at the top right corner, when user clicks on it, I want to open basiceditfield with animating from right to left. I want Animation should be like default search on main screen in blackberry. How to do this? Is it possible?
You can do almost anything with the Blackberry Ui, if you understand it and are prepared to put the time in. But what you see when you press the magnifying glass is something that someone has spent a lot of time doing. There is API for doing anything like that (at least not one I have found). So if you are not experienced doing BlackBerry Ui, as I suspect is the case here, then I would suggest that replicating what the BB engineers have done with the animation from the search icon on the Home screen to the search screen, is too difficult to justify.
A lot of these sorts of things are, in my opinion, just gloss. They do not make the application any easier to use, just make it look flash. Personally, I would spend your time on making sure your application works well, rather than making it look flashy.
I do recommend using the screen transition animations as a way of moving from one screen to another. These are fairly easy to use and when used correctly, provide a good visual clue to your user regarding the flow through your application. I also suggest you spend some time making sure your assets (icons etc.) look good, on all the various sizes of BB that you are developing for.

When I build my app my simulator looks different from my viewcontroller.xib

I was making a user interface using storyboards and when I built my app to see how it would look in the iOS simulator it didn't look like the viewcontroller in the storyboard (some of the buttons were moved around and I had to move one button way down so it was in the place i wanted it to be). Does anyone know why this is?
Yes, the reason is auto layout, it will automatically position elements on a relative basis depending on the device you're running.
You can turn autolayout off, or build for all devices at once and keep it on.
You may want to read iOS Auto Layout Demystified by Erica Sadun which goes in depth to the world of autolayout.

Windows mobile controlling scroll bar with finger

I have a question about the windows mobile development.
I created a mobile form on the windows mobile 6.0 test project. But that example form slightly larger than the vertically normal pocketpc forms. I now everybody said you can press the scrollbar for accessing bottom or any location of the form.
But i need to use the finger for easy navigating form areas. This kind of iphone :)
Is it possible ? how can i make this ?
Windows Mobile 6.5 adds gesture support, that is supposed to allow such functionality for finger control. Of course, your code has to take advantage of it.
You can also write your own, which isn't difficult, but still cumbersome.
My answer could be classified as subjective. I try to now show the scroll bar when possible for just that reason. On most devices that have touch screen, you can scroll using you finger (and I'm a somewhat large guy -- 6'3" with farmer kid hands).
But if you are displaying a grid, that isn't always possible. The results can go off the screen very easily. Oh well, grab a pen and hit the scrollbar.
Other screen elements that can help: tab control. separate your controls into groups and put each group on a separate tab. I also do a lot of wizards with LARGE next and previous buttons.
But in all of this, if it is designed to be stylus free, just pray the user doesn't have to type anything using the screen soft keyboard. That just doesn't work with a finger.

Resources