Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

distribute option in interface builder of iPhone

i have following buttons in my application.

Now i want to set equal spacing among all buttons.

Suppose If I am using corelDraw or Photoshop, there is always an option for align & distribute.

Here I need to distribute my objects vertically.

How is that possible in interface builder of iPhone?

Sample image is given below, in which distribution is required. alt text http://img268.imageshack.us/img268/4146/problem13.png

like image 526
Sagar Kothari Avatar asked Aug 24 '09 19:08

Sagar Kothari


People also ask

How do you distribute iOS build?

Click Distribute to make the build available to testers. To share links to specific releases with testers who have access to those releases, click the Link icon to copy the release link to the clipboard.

How do I distribute my Iphone apps?

You export the app to distribute it outside of the App Store, and upload it to distribute it through TestFlight or the App Store. In the Archives organizer, select the archive, then click Distribute App. In the next sheet, select a distribution method based on your app's platform.

What is iOS distribution?

Surbhi Garg. June 28, 2022 02:34. A Distribution Provisioning Profile is a combination of your App ID and Distribution Certificates. It authorizes your app to use particular services (like Push Notifications) and ensures that your app is submitted by you.

How do I distribute iOS app ad hoc?

In the sidebar, click Profiles. Then, next to the heading Profiles, click the + button to create a new provisioning profile. Under Distribution, select Ad Hoc. Click Continue.


3 Answers

I know this post is ages ago, but for the sake of simplicity (maybe) and to avoid using table views (for sure)...

In your example, if you select the first UIButton, keyword, and press option key, interface builder shows you the relative distance from the center to any other object you hover with the mouse. So if you decide the optimal distance is the one between keyword and category buttons, you can apply that distance for the rest of objects simply adding or substracting the appropriate amount of pixels from the button size inspector.

Hope it helps!

like image 143
bre4the Avatar answered Nov 11 '22 06:11

bre4the


Depending on the type of object, you might do this.

Select all implied objects. 

Select Editor->Embed in->Matrix; 

this will place the objects regularly.

Then select the option Editor->Unembed

and the objects will keep their new positions. Hope this helps!

like image 38
José Rafael García-Bermejo Gin Avatar answered Nov 11 '22 04:11

José Rafael García-Bermejo Gin


I dont think there an option to do it automatically, you can do some math though and get them to have equal spacing by setting their frames...

like image 1
Daniel Avatar answered Nov 11 '22 04:11

Daniel