iOS Navigation Bar Icon Size iPhone 6 - ios

Excuse me if this has been asked but I cannot seem to find a good answer.
I have vector PNG icons that were generated at 64x64 pixels.
What I'm trying figure out is how to add them as custom nav bar button icons so they look good in iOS8/iPhone 6 down to iPhone4s.
It seems like when I add the 64x64 icon in XCode and associate the icon with the custom button it doesn't scale down, it just remains 64x64 which is too big for the nav bar itself.
What is the best way to handle this? I don't want want it to look pixelated in in retina.

You need add to project 2 files for each devices scales with such names:
your_icon_name#2x.png - for iPhone4, 4s, 5, 5s and iPhone6;
your_icon_name#3x.png - for iPhone6 plus.
https://developer.apple.com/library/IOs/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html - The sizes of icons for each scale.
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html#//apple_ref/doc/uid/10000051i-CH7-SW17 - This to learn deeper about different resolutions support in iOS.

Related

Black bar appears on top when running on iPhone 6 & iPad Pro Simulator

When I run my game on the simulator, specifically on iPhone 6 and iPad Pro, it shows black bar on top of the screen. I have looked the answer up online and have literally tried every single thing and have went through all the answers, but none have worked. My deployment is set to 7.0 and have tried running with setting just set to LaunchImage from asset folder and LaunchImage & LaunchScreen.xib combined. I also do have the right size pictures required in asset including iPhone Retina 4, as well, and that doesn't fix the problem either. Is this just a glitch on the simulator or there is a way around this?
I got it working. For some reason my 2x images were short for the screen size, and had to extend them more. Even though height wise, my images had more length than the screen size.
Hope this helps people. I came across several people who had done everthing right, but still couldn't get it working. I believe it is because image isn't large enough to cover the whole screen
Stretched mode?
Are you providing Default screens in all sizes as suggested in:
Dealing with iPhone 6/6+ startup images
How to Update Your Apps for the 4-Inch iPhone 5 Display
Restoring integrity in Startup screens
Images clipped?
If not running in stretched mode, pick a View Mode best suited for your images, such as Aspect Fill and Scale to Fill, both of which will cover your UIImageView in LaunchScreen.storyboard.
Add Default-568h#2x.png Image with resolution 640x1136.
Make sure 'App Icons and Launch Images' look like below image:
it worked in simulator with iOS 9.

How to force universal app on iPad into scale mode?

I created an universal iOS app. On all iPhone variants I want native resolution without scaling, so I created splash screen images for all available sizes in images.xcassets/LaunchImage.launchimage and set them all in Xcode:
Now, this works very well for all iPhone versions up to the biggest iPhone 6 Plus.
On iPad (with high pixel density) though I don't want native resolution. Instead I want it to scale the app (even if it looks a bit blurry then, but that's ok).
How would I do that?
In image assets you have to provide proper size for each launch screen, You can not use the same image for two devices in launch-images ( unless you have two copies of the same image ).
If you want to make app-size smaller, implement launch screen, set its background color to your desired background color and put your logo in the center of it. You can now remove iPhone 6,6Plus images from image assets, but you still have to provide launch images for iOS 7 devices (old iPhones / iPad ).
Don't use the Asset Catalogue. Create a LaunchScreen.xib , add a UIImage inside the view. Open the attribute inspector in the right hand panel and set the view mode to Aspect Fill.
The solution was quite easy, I simply changed project type from "universal" to "iphone" and that did the trick!

How to remove keyboard enlargement in ios objective c

I want to show keyboard smaller but causing problem. Please compare both images, keyboard size is bigger in first image than second image and also vertical spacing between two character is more . I have already added Retina 4-inch launch image ,Retina HD 4.7 inch launch image and retina HD 5.5 launch image. Keyboard is showing proper in iphone 6 but my app design causing problem when i run in iphone 5. How I can show keyboard smaller without design problem? I have searched a lot but couldn't get solution of this problem.
This is image shows the proper keyboard size which I want in my app.
this is my iPhone 5 design image, here keyboard is looking starched.
see this is my iPhone 6 design image, it is looking fine.

ios:Application got stretched

I have a legacy code in which autolayout is not used perhaps autoresize mask is used, but whats strange is that even navigation bars look stretched when I deployed that app to iPhone 6+. I have to modernize this app so that navigation bar stays 44pts in all device families, new keyboard appears etc.
Please suggest me ways to do the same.
Thanks
Ankit
as first step, add the right default.png. (https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html)
==> That shows iOS you support the new screen size of iphone 6 / 6+
THEN
it dependents on your app. If you used fixed pixel values based on the old 'default' screen width. you'll have to make it all dynamic
if everything IS already dynamic, you're good
THEN (optional but recommended)
use the new #3x size for all your assets so they don't look blurry
Add a default.png for iPhone 6 and iPhone 6 Plus https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html

Tab bar icons on retina display

I am making an iPhone App but I can't understand why my custom tab bar icons are pixelated. They are 30x30. If I change the resolution to 60x60, for example, the icons are still pixelated but they are also incomplete.
Can you help me to fix this problem? Thank you very much.
You don't need to double the size of your non-retina images.
You need to create two separate icons icon.png (30x30) and icon#2x.png (60x60).
iOS will automatically load the right file based on the screen scale.
You can find more information about taking advantage of the retina display at this url: https://developer.apple.com/resources/high-resolution/

Resources