iphone-common-codes-ccteam源代码 CCUISlider.m

//  
// CCUISlider.m
// CCFC
//
// Created by xichen on 11-12-28.
// Copyright 2011 ccteam. All rights reserved.
//


#import "CCUISlider.h"




@implementation UISlider(cc)


// create a common UISlider
+ (UISlider *)createCommonSlider:(CGRect)rect target:(id)target sel:(SEL)sel
{
UISlider *slider = [[UISlider alloc] initWithFrame:rect];
if(slider == nil)
return nil;
slider.minimumValue = 0;
slider.maximumValue = 100;
[slider addTarget:target
action:sel
forControlEvents:UIControlEventValueChanged];
return [slider autorelease];
}


@end

 

可能有更新:

googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUISlider.m

github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUISlider.m

你可能感兴趣的:(iPhone)