Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-22-2012, 09:50 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 1
drylight is on a distinguished road
Default Checkboxes in iTunes U app are custom controls?

I noticed Apple's iTunes U application using checkbox controls. I was wondering if they were HTML/CSS checkboxes in a web view control, or are they custom CocoaTouch controls?
drylight is offline   Reply With Quote
Old 01-22-2012, 10:04 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

I haven't used iTunes U yet so I haven't seen them, but I doubt it's not native. There's no checkbox type control in CocoaTouch yet, or at least not a public one, but it would be pretty simple to make one. I'm sure there's a freeware one (if not many) already out there. Just Google "Custom iOS controls" and I'm sure you'll find something useful.
baja_yu is offline   Reply With Quote
Old 01-23-2012, 03:33 AM   #3 (permalink)
Daddy Cool
iPhone Dev SDK Supporter
 
MarkC's Avatar
 
Join Date: Mar 2009
Location: Yorkshire, England
Age: 100
Posts: 1,616
MarkC is on a distinguished road
Default

Just use a 'custom' UIButton with images based upon a certain state, for example (this also uses a method that sets alpha and the enabled property for the button):

Code:
-(IBAction)checkboxPressed:(id)sender {
	if (!isChecked) {
        [self.btnCheckbox setImage:[UIImage imageNamed:@"tickbox_on"] forState:UIControlStateNormal];
        [self doAlpha:1.0 :YES :self.btnBuyNow];
        isChecked = YES;
    } else {
        [self.btnCheckbox setImage:[UIImage imageNamed:@"tickbox_off"] forState:UIControlStateNormal];
        [self doAlpha:0.75 :NO :self.btnBuyNow];
        isChecked = NO;
	}
}

-(void)doAlpha:(float)alpha:(BOOL)enabled:(id)UIElement {
    [UIElement setEnabled:enabled];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.2];
    [UIView setAnimationDelegate:self];
    [UIElement setAlpha:alpha];
    [UIView commitAnimations];
}
MarkC is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 388
10 members and 378 guests
7twenty7, Atatator, FrankWeller, glenn_sayers, iphonedevshani, MAMN84, mraalex, QuantumDoja, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0