Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

UISwitch on iPad?

LevyMastLevyMast Posts: 97Registered Users
While creating an universal app, I noticed that you can't resize UISwitch and UISliders.
They look small on the iPad simulator. There are similar re-sizing problems with UIAlertView and
UIActivityIndicatorView. All tiny!

Even in the code, they comment:
- (id)initWithFrame:(CGRect)frame; // This class enforces a size appropriate for the control. The frame size is ignored.
This is getting frustrating.

Did Apple design any UI for the iPad?

I would rather not have to re-code the wheel.
Post edited by LevyMast on

Replies

  • baja_yubaja_yu Posts: 6,166Super Moderators, Registered Users
    Are you sure you simulator isn't just at 50% scale? The size of the items is fixed and is appropriate regardless of the device.
  • LevyMastLevyMast Posts: 97Registered Users
    For me, the size of UISwitch is fixed at (79,27) for both the iPhone and iPad simulator.
    The simulator scale doesn't affect the size, in terms of coding results.

    Most examples initialize switches with CGRectZero, because apparently, it's futile to change the size:
    UISwitch *switch = [[UISwitch alloc] initWithFrame:CGRectZero];
    I need all iPad controls to be exactly double the original size found on the iPhone.

    Apple's one-size-fits-all scheme simply doesn't work for the iPad!
  • baja_yubaja_yu Posts: 6,166Super Moderators, Registered Users
    I wouldn't agree with that last sentiment. But anyways, if you want to customize them beyond what Apple provided, you'll have to make your own. There are probably a few out there already, just do a quick Google search.
  • nobre84nobre84 Posts: 963Registered Users
    Why do you think the switch should be bigger ? The physical dimensions of both iPhone and iPad ones will be similar and equally easy to target/interact with by the user. If you really need it to be double dimensions (which will be very weird), you could create your own switch-like control very easily by using custom images for the normal and selected states of a regular UIButton.
  • LevyMastLevyMast Posts: 97Registered Users
    nobre84 said:

    Why do you think the switch should be bigger ? The physical dimensions of both iPhone and iPad ones will be similar and equally easy to target/interact with by the user. If you really need it to be double dimensions (which will be very weird), you could create your own switch-like control very easily by using custom images for the normal and selected states of a regular UIButton.

    I'm using a very simple scheme to convert my iPhone app to iPad. Everything is doubled. All images, texts, and
    and controls are doubled in size.

    So, if anything looks weird, it's having tiny iPhone-sized controls on a iPad app where everything
    should be doubled in size.

    I didn't realize Apple restricted the size of their controls, so now I'm forced to create my
    own I guess, so everything looks "proportional".
    Post edited by LevyMast on
  • nobre84nobre84 Posts: 963Registered Users
    What I mean is, the iPad has all the extra size for a reason: to enable us to add more content , not supersize the same content. It would be better then to just adjust all your view springs to enable them to stretch out to fill screen.
    Unless of course you are creating a special kind of app for the visually impaired, whom would be glad to have super-sized controls. Every other single iPad user out there though would look at your app and find it out of place on the system.
    Sorry I couldn't come up with a real solution, instead I'm trying to spare you of all this extra work of doing it yourself only to find out your users will hate it.
  • baja_yubaja_yu Posts: 6,166Super Moderators, Registered Users
    Besides what nobre84 said, keep in mind that that the iOS Human Interface Guidelines are a part of the review process and if you stray too much your app could be rejected.
  • Duncan CDuncan C Posts: 8,031Tutorial Authors, Registered Users
    LevyMast said:

    nobre84 said:

    Why do you think the switch should be bigger ? The physical dimensions of both iPhone and iPad ones will be similar and equally easy to target/interact with by the user. If you really need it to be double dimensions (which will be very weird), you could create your own switch-like control very easily by using custom images for the normal and selected states of a regular UIButton.

    I'm using a very simple scheme to convert my iPhone app to iPad. Everything is doubled. All images, texts, and
    and controls are doubled in size.

    So, if anything looks weird, it's having tiny iPhone-sized controls on a iPad app where everything
    should be doubled in size.

    I didn't realize Apple restricted the size of their controls, so now I'm forced to create my
    own I guess, so everything looks "proportional".

    I think your basic premise is wrong. Controls should not be twice as large on iPad as they are on iPhone. Some of the controls on iPhone are a little cramped to fit on the small screen, some are big enough as they are.

    A few of Apple's controls are larger on iPad, but not many.

    For the majority of controls, they should not be bigger on iPad. They're big enough to convey the info they convey, and for users to operate them with their fingers. The fact that the screen is bigger lets us put more content and controls on the screen, which is a good thing. Double-sized controls will look silly, in my opinion.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
  • LevyMastLevyMast Posts: 97Registered Users
    Duncan C said:


    I think your basic premise is wrong. Controls should not be twice as large on iPad as they are on iPhone. Some of the controls on iPhone are a little cramped to fit on the small screen, some are big enough as they are.

    A few of Apple's controls are larger on iPad, but not many.

    For the majority of controls, they should not be bigger on iPad. They're big enough to convey the info they convey, and for users to operate them with their fingers. The fact that the screen is bigger lets us put more content and controls on the screen, which is a good thing. Double-sized controls will look silly, in my opinion.

    I didn't mention this is a game app for a younger audience, so I hope they appreciate oversized controls.
    I was using Apple controls because it was convenient. But, now, it makes sense to create my own.
    Thanks.
  • LevyMastLevyMast Posts: 97Registered Users
    Here's an example of how big my controls will be. This is a iPad screenshot of a popular gaming app.
    All screens are 768x1024.

    http://www.mobygames.com/images/shots/l/519463-cut-the-rope-ipad-screenshot-main-menus.png
    http://www.mobygames.com/game/ipad/cut-the-rope/screenshots

    They use the same strategy. Everything is doubled in size for the iPad.
    Just like the iPhone version, but only 2x bigger.
Sign In or Register to comment.