new to Xcode 7 ; simple label will not center in the simulator - uilabel

I am taking a class online and one of the projects is to create a label.
In Xcode, I have centered it on both the vertical and horizontal axis, but when I run the simulator, and its always to the right side, not centered. I even tried it with other simulated phones.
This happens with text fields too.
I'm really not sure what is wrong, because in Xcode it is displaying correctly.

Follow these steps.
First Drag and drop a UILabel.
2.Check below picture
Now click on the green circle icon (right - bottom corner, second from left) shown in below image
Then you can see a popup appears like below image, click on "Horizontally in Container" option.
5.Click on this red circle icon(right-bottom corner)(next to the previous green circle icon), Then you can see another popup like below image.
Now you can see a popup like this
In this Uncheck " Contrain to margins" options so it will look like this below image
Save and Run your code, so you can see the UILabel at center for all devices.
Output will be like

Related

Xamarin - how to center controls using the IDE , visually?

I have a splashscreen / launchscreen. It contains a title (label), an image 300x300 and a small label that says copywrite info. I'm trying to center the 3 controls vertically so they fill the screen. (at least look nice) I can't figure out or find instructions how to center the 3. I can create vertical constraints, width contraints and constraints relative to the other controls. But they never appear centered on iPhone5, iPhone6, 6plus etc...
how do you center 3 controls vertically and horizontally using the IDE, so they appear correctly on ALL devices/layouts?
thanks in advance.
how do you center 3 controls vertically and horizontally using the IDE, so they appear correctly on ALL devices/layouts?
Its strange that Xamarin Studio doesn't have a quick auto layout toolbar similar to XCode where you can align your controls vertically or horizontally with one click.
But they provide one not so obvious way to do it.
1. Make sure when you place any control on any screen on storyboard, you place it vertical center with the help of guiding lines.
2. Once you place it click on the control again when it shows the constraint guidelines.
3. At the center of the control there is a dot, drag that dot to until you see the vertical guideline and place it once the line turns blue.
Now your control should be aligned vertically center for all devices.
Hope this helps, happy coding :)

IntelliJ IDEA: Increase size of bar on the right side of editor

I'd like to increase the size of the bar on the right side of the Editor in IntelliJ IDEA. It's simply way too small for my taste.
It is the bar where the warnings or usages are displayed.
P. S.: The bar is called Error Stripe.
I agree, the scrollbar is far to small, and hard to see.
Another option you could try is installing the "CodeGlance" plugin which adds a full view of the code and makes scrolling far more intuituve.
Grab it from (as of 15-04-27) https://plugins.jetbrains.com/plugin/7275?pr=clion
Press Ctrl + Alt + Shift + / and select Registry... from the menu that appears.
Look for editor.full.width.scrollbar and tick the box on the right. The change should take effect after clicking the close button. The width of the scroll bar should be marginally wider, it's not a lot but every little bit helps :-)
Unfortunately this setting only affects the scroll bar on the right of the editor window. All the other scroll bars are unaffected.
For those that find transparency effects annoying then look for editor.transparent.scrollbar and untick the box on the right. This change should take effect after clicking the close button and restarting IntelliJ.
It seems like it – or the scrollbar as a whole – can't be resized.
You could scroll to the bottom of the bars properties in the GUI section and change the width to example (100dp). Or you could play around with the XML file that contains the width and height property.

ios APP icon not showing correctly when having border

Hi I have app icon which has a border in it. Now the problem is that it is not displaying it correctly in the iTunes. I have also attached the screenshot of it. Please let me know what wrong am I doing. The icon being displayed is just a sample from the other app which has the same issue.The image is 512*512 rounded.
You should avoid rounded corner icon, because Apple applies masks to your icon image for this. Provide a sqaure-ish icon of dimensions 120x120 pixels.
You should avoid rounded corner icon, because
Hope that helps!
Or if you really want to add border by yourself then you need to follow these guidelines to add border
http://tobiasahlin.com/blog/exact-border-radius-for-ios-icons/

x and y coordinates of mouse location in Photoshop

How do I turn on the X and Y coordinates for the location of the mouse on screen?
I have Photoshop CC. I'm creating interfaces and would like to be able to know the location of my mouse.
Although I can't currently check as i don't have photoshop CC on this computer, from past experience if you go
Window -> Information
A palette should appear with the coordinates of the cursor in it.
Press F8 to open info palette. That will show your mouse position in x and y coordinates.
You can also press Ctrl + R to view the ruler. Then take the mouse to the top left corner and by dragging from there you can change 0,0 coordinates of x,y position to anywhere on canvas.
when you draw something like rectangle and draw with pressing space bar. It will show lively width height and x y coordinates as well in Photoshop CC
Position with guides and the grid
Guides and the grid help you position images or elements precisely. Guides appear as nonprinting lines that float over the image. You can move and remove guides. You can also lock them so that you don’t move them by accident.
Smart Guides help you align shapes, slices, and selections. They appear automatically when you draw a shape or create a selection or slide. You can hide Smart Guides if you need to.
The grid is useful for laying out elements symmetrically. The grid appears by default as nonprinting lines but can also be displayed as dots.
Guides and grids behave in similar ways:
Selections, selection borders, and tools snap to a guide or the grid when dragged within 8 screen (not image) pixels. Guides also snap to the grid when moved. You can turn this feature on and off.
Guide spacing, along with guide and grid visibility and snapping, is specific to an image.
Grid spacing, along with guide and grid color and style, is the same for all images.
Show or hide a grid, guides, or smart guides
Do one of the following:
Choose View > Show > Grid.
Choose View > Show > Guides.
Choose View > Show > Smart Guides.
Choose View > Extras. This command also shows or hides layer edges, selection edges, target paths, and slices.
Place a guide
If the rulers are not visible, choose View > Rulers.
Note:
For the most accurate readings, view the image at 100% magnification or use the Info panel.
Do one of the following to create a guide:
Choose View > New Guide. In the dialog box, select Horizontal or Vertical orientation, enter a position, and click OK.
Drag from the horizontal ruler to create a horizontal guide.
Drag to create a horizontal guide
Dragging to create a horizontal guide
Hold down Alt (Windows) or Option (Mac OS), and drag from the vertical ruler to create a horizontal guide.
Drag from the vertical ruler to create a vertical guide.
Hold down Alt (Windows) or Option (Mac OS), and drag from the horizontal ruler to create a vertical guide.
Hold down Shift and drag from the horizontal or vertical ruler to create a guide that snaps to the ruler ticks. The pointer changes to a double-headed arrow when you drag a guide.
(Optional) If you want to lock all guides, choose View > Lock Guides.
Move a guide
Select the Move tool , or hold down Ctrl (Windows) or Command (Mac OS) to activate the Move tool.
Position the pointer over the guide (the pointer turns into a double-headed arrow).
Move the guide in any of the following ways:
Drag the guide to move it.
Change the guide from horizontal to vertical, or vice versa, by holding down Alt (Windows) or Option (Mac OS) as you click or drag the guide.
Align the guide with the ruler ticks by holding down Shift as you drag the guide. The guide snaps to the grid if the grid is visible and View > Snap To > Grid is selected.
Remove guides from the image
Do one of the following:
To remove a single guide, drag the guide outside the image window.
To remove all guides, choose View > Clear Guides.
Set guide and grid preferences
Do one of the following:
(Windows) Choose Edit > Preferences > Guides, Grid, & Slices.
(Mac OS) Choose Photoshop > Preferences > Guides, Grid, & Slices.
For Color, choose a color for the guides, the grid, or both. If you choose Custom, click the color box, choose a color, and click OK.
For Style, choose a display option for guides or the grid, or both.
For Gridline Every, enter a value for the grid spacing. For Subdivisions, enter a value by which to subdivide the grid.
If desired, change the units for this option. The Percent option creates a grid that divides the image into even sections. For example, choosing 25 for the Percent option creates an evenly divided 4‑by‑4 grid.
Click OK.
To the top
Work efficiently with Smart Guides
Smart Guides come in handy in several scenarios, such as the following:
Option (Mac)/Alt (Win) + Drag a Layer: When you drag a layer while keeping the Option (Mac) or Alt (Windows) key pressed, Photoshop displays reference measurement guides showing the distance between the original layer and the duplicate layer. This feature works with both the Move and Path Selection tools.
Distance between the layers: original and duplicate
Distance between the layers: original and duplicate
Path measurements: Photoshop displays measurement guides while you're working with paths. Measurement guides are also displayed when you select the Path Selection tool and then drag a path within the same layer.
Path measurements
Path measurements
Matched Spacing: When you duplicate or move an object, Photoshop displays measurement guides to visually indicate spacing between other objects that match the spacing between the selected object and its immediate neighbors.
Cmd (Mac)/Ctrl (Win) + Hover Over a Layer: You can view measurement guides while working with layers. With one layer selected, hover over another layer with the Cmd (Mac) or Ctrl (Windows) key pressed. You can use arrow keys in conjunction with this feature to nudge the selected layer.
Measurement guides while working with layers
Measurement guides while working with layers
Distances from the canvas: When you hold down the Cmd (Mac) or Ctrl (Windows) key while hovering outside a shape, Photoshop displays distances from the canvas.
Distances of a shape from the canvas
Distances of a shape from the canvas
Spacing between matched objects

Is UITabBar's Icon must be monochrome?

It seems that all color except transparency count as one color. If I use this pictures, all I get is a big box and only the first 2 lines are drawn.
What do do if we want colourful tab bar icons then?
Note: If I use the image above, what I get is this:
There isn't anyway to make colorful tab bar icons isn't it? Where is this documented anyway?
Yes, the image you use for a custom tab bar icon is just used as a mask to create the icon you will see when the app runs. It should be white with appropriate alpha trasparency. This is documented here: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html