How to reslice an image in Xcode? - ios

I am often a bit silly when I try to slice resizable images, and end up in this situation:
As you can see, I've done a 9-slice on the top image, and a 3-slice on the bottom. And yet, Xcode doesn't let me back out of this. My option seems to be deleting and then re-adding the image. But is there a way do re-specify slicing within Xcode?

While in slicing view, select the image you are want to reset (click on its title) and open the attributes inspector in the right sidebar (⌥⌘4). Under "Slicing" you can change slicing parameters, and even disable it.

Related

Resizing Image in Xcode?

Is there any way I can resize an image that I copy into my project, according the the size I need in pixels for example maybe I want to reduce the height and width by 100px then add it to my imageView or any other object. are there any tools that Xcode provide within the Xcode. I want to do it using interface without any programming so is there any way?
The simple answer would be "NO".
I do not aware of any way to use Xcode resizing images.
The easiest method for me is to right click on any image and select "Open with External Editor". Preview should be opened and the app is quite simple to use.
Assuming that you are referring to the layout in storyboard/IB.
To get the native size of the image just select the image and press Command + = on the keyboard. the to re-size it proportionally select the corner and hold down the shift key when you re-size it.

Left constraints in Xcode 7

So I'm doing a tut on iOS 9 development with Xcode 7, and in the example I'm currently doing the instruction is adding constraints using ctrl+drag and clicking on a second image. Now my issues isn't with that process, my issue is when the video asks me to set left constraints (the right image attached) I don't have that option (the left side of the image attached). I tried "leading" just to see what it would do and it did not achieve desired results. I'm guessing that this is changed in Xcode 7 and there is a new method of achieving this result?
Any help is appreciated, thanks!
EDIT: To update my question as per a suggestion below, here's what's happening. I have a background image view. When I am lining up image buttons along the background image, the first one is just fine, once I select the second one, and add the leading constraint, then lock in the width and height in the main constraints - it flies off the page somewhere. The background image is horizontally and vertically aligned to the container, and the main reason I'm doing this is I have "landscape mode" pulled up in a main preview window and I want to make sure that everything is looking good in that mode.
I have tried starting a new project all together and I get the same result. Again the tutorial I'm following was using Xcode 7 beta, so not sure if that has something to do with it. I'd like to lock in on the problem instead of skipping over it in case I run into this in the future.
Thanks!
Try using the main constraints menu at the button of Xcode.
See below screenshot: click the element you want to add a constraints to and it will give you the options you need.
Cheers,
Tal

LaunchScreen.xib not displaying my custom font

I'm using a label to display text with my custom font on LaunchScreen.xib. My custom font shows up fine in the Interface Builder, but when I test it on my iPhone the font reverts back to the default font.
Not sure how to fix this or if it's a bug.
There's no big surprise here. The launch screen is shown at launch time - actually, before launch time - so the font probably hasn't yet loaded.
You could file a bug if you think you have a compelling use case. But I don't really think you do. Why are you showing any text in your launch image? It should be much more bare-bones than that - just enough to give the structure of the opening interface, which will be filled in when the opening interface actually appears. A "blank" screen with the same background color as the initial view controller's background color would be sufficient. You goal is just to provide an alternative to blackness.
A quick workaround is to use an UIImageView and have your text as UIImage on it, literally a picture of your text as .png / .jpeg or similar.
Note: It may take some time before you can see the image, I had to clean the Build Folder and reinstall the app a couple of times in order to see the image.
Another note: If you want to support multiple languages with different texts you will need to have different images for each language using this approach.

Setting the icon for my App?

![I'm trying to submit my app to Appstore but I'm facing a problem with setting up the icon for my app, I've tried all the variation of sizes for the icon size, but still it's giving me errors , I have taken a snapshot for those errors please help :]
Take 1024x1024 icon and generate other icons form http://makeappicon.com/
The images you use should be exactly in the specified dimensions. Even when you can put them "inside the box" of the UI, they must be correctly sized. Please check your files in the Editor, if they are really the right size.
And then, also try with clean build the project.
Remove the icons (Icon-*) from Images.xcassets, you don't need them there. You just need to drag your icons from Finder into their respective boxes inside AppIcon. And make sure you have the correct size for each icon.

App loading Image

sometimes when I start my App it shows me a black screen until its loaded.
Where is the place to add an Image or whatever to show that in instead of that nasty black screen?
Thanks in advance,
Philip
The black screen simply means that there is no launch image set for your app. The newest and in my opinion easiest way to add these is to use an Asset catalog.
If you created your app in a recent version of xCode, an asset catalog named Images.xcassets is automatically created for you.
Navigate to the same by clicking on it and then simply drag and drop your image into the same.
Here's a screenshot:
I would also strongly recommend that you maintain all graphics used in your app via this Asset catalog. The big advantage with using this process is you don't have to worry about the usual naming conventions you would need if you included graphics outside of an asset catalog - for e.g. You no longer have to name retina images as #2x
Something really simple in fact. Go to Xcode, Tap the project on the top, on the drop down menu on the top left select the target, then click General and select images at where it says Launch Images

Resources