UISegmentedControl UISlider

简介:
 self.view.backgroundColor = [UIColor whiteColor];
    //UISegmentedControl 是iOS中的分段控件,事实上是多个button的组合视图,通过切换不同的segment(严格来说,点击不同的button),响应不同的操作.
    NSArray *titles = @[@"轻拍", @"长按",@"轻扫",@"平移"];
    UISegmentedControl *segmentControl = [[UISegmentedControl alloc] initWithItems:titles];
//    //设置默认选中的分段
    segmentControl.selectedSegmentIndex  = 0;
    segmentControl.frame = CGRectMake(10, 40, 300, 30);
//    //给segmentedControl加入响应事件
    [segmentControl addTarget:self action:@selector(handleSegmentControl:) forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:segmentControl];
    [segmentControl release];
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    view.backgroundColor = [UIColor blackColor];
    view.tag = 200;
    [self.view addSubview:view];
    [view release];




 

UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);





本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5306994.html,如需转载请自行联系原作者


相关文章
UINavigationBar-使用总结
UINavigationBar-使用总结
83 0
|
iOS开发
UISearchBar去除背景
UISearchBar去除背景
106 0
UISearchBar去除背景
|
开发者 iOS开发
UIDatePicker的详细讲解
UIDatePicker的详细讲解
389 0
 UIDatePicker的详细讲解

热门文章

最新文章