PDA

View Full Version : Cannot create multiple buttons




Baddicus
Sep 4, 2012, 06:46 PM
Within Interface Builder (using iOS 4.2 library) I cannot drag more than a single button into my view. It always stays centered (but I can resize it) and if I try to get a new button in there, it simply replaces the original button.

I'm not worried about making the button(s) do anything at this point, but what am I missing to manipulate the button layout and getting more than a single button?



Duncan C
Sep 5, 2012, 08:46 PM
Within Interface Builder (using iOS 4.2 library) I cannot drag more than a single button into my view. It always stays centered (but I can resize it) and if I try to get a new button in there, it simply replaces the original button.

I'm not worried about making the button(s) do anything at this point, but what am I missing to manipulate the button layout and getting more than a single button?

It always stays centered? That doesn't make sense. Buttons go where you put them.

It sounds like you've got some funky setting that is forcing your buttons to be centered in both dimensions, so new buttons are landing on top of the old. What version of Xcode are you using, and what version of iOS are you using? Are you using the new layout features in iOS 6 (which I can't discuss here because they are under NDA)? I could see you getting yourself in all kinds of trouble with that if you didn't use it right.

Baddicus
Sep 6, 2012, 05:22 AM
Xcode ver 3.2.5
iOS ver 4.2

If it's some setting, I suspect a cocoas2d library I tried to get going. I haven't messed with that yet, but it's the only thing I can think that would adjust any settings.

I tried removing that stuff, but it still does it. I'm going to reformat and just get a clean install of xCode and everything else.

Duncan C
Sep 6, 2012, 07:06 AM
Xcode ver 3.2.5
iOS ver 4.2

If it's some setting, I suspect a cocoas2d library I tried to get going. I haven't messed with that yet, but it's the only thing I can think that would adjust any settings.

I tried removing that stuff, but it still does it. I'm going to reformat and just get a clean install of xCode and everything else.

How about creating a new project? Reformatting and installing Xcode is not the right solution.

----------

Xcode ver 3.2.5
iOS ver 4.2

If it's some setting, I suspect a cocoas2d library I tried to get going. I haven't messed with that yet, but it's the only thing I can think that would adjust any settings.

I tried removing that stuff, but it still does it. I'm going to reformat and just get a clean install of xCode and everything else.

Gak. Why are you using Xcode 3.x? It is badly out of date, and you'll just have to start again from scratch to learn Xcode 4.x. Apple, in their infinite wisdom, changed every single thing about the UI between Xcode 3 and Xcode 4, and the longer you spend with Xcode 3.x, the worse the adjustment will be. You can't build for iOS 5 in Xcode 4, and you certainly won't be able to build for iOS 6.

ArtOfWarfare
Sep 6, 2012, 07:59 AM
Sounds like you've deleted your root view or window to me.

Try dragging a view in instead and see if you can drag multiple buttons into that view.

dejo
Sep 6, 2012, 09:05 AM
Apple, in their infinite wisdom, changed every single thing about the UI between Xcode 3 and Xcode 4...

Well, that's quite an exageration.