音频播放,gif图的播放,毛玻璃效果 UISlider,UIStepper,UISegmentedControl

//音频播放功能

//    self.stepper=[[UIStepper alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];

//    [self.view addSubview:self.stepper];

//    self.stepper.stepValue=2;

//    [self.stepper addTarget:self action:@selector(stepAction:) forControlEvents:UIControlEventValueChanged];

//    [_stepper release];

//    

//    NSString *path=[[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp3"];

//    self.play=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil];

//    [self.play play];

//    [_play release];

    

    //毛玻璃效果

//    UIImageView *imageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"160.jpg"]];

//    imageView.frame=CGRectMake(0, 0, self.view.frame.size.width,200);

//    [self.view addSubview:imageView];

//    [imageView release];

//    //先创建一个毛玻璃的效果

//    UIBlurEffect *effect=[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

//    //创建一个毛玻璃视图,指定效果 iOS8.0之后出现的效果

//    UIVisualEffectView *effectView=[[UIVisualEffectView alloc] initWithEffect:effect];

//    

//    effectView.frame=imageView.frame;

//    [imageView addSubview:effectView];

//    //播放GIF

//    self.tomcatImageView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 375, 400)];

//    [self.view addSubview:self.tomcatImageView];

//    [_tomcatImageView release];

//    

//    //容器使用之前,一定要对容器进行初始化

//    self.picArr=[NSMutableArray array];

//    for (NSInteger i=0; i<81; i++) {

//        //拼接图片的名称

//        NSString *pinName=[NSString stringWithFormat:@"knockout_%02ld.jpg",i];

//        //根据图片名找到对应的图片

//        UIImage *image=[UIImage imageNamed:pinName];

//        //把图片添加到数组中

//        [self.picArr addObject:image];

//    }

//    //

//    self.tomcatImageView.animationImages=self.picArr;

//    //执行的时间

//    self.tomcatImageView.animationDuration=5;

//    //执行的次数

//    self.tomcatImageView.animationRepeatCount=10;

//    [self.tomcatImageView startAnimating];

//    

//    

//    self.slider=[[UISlider alloc] initWithFrame:CGRectMake(130, 450, 100, 100)];

//    [self.view addSubview:self.slider];

//    [_slider release];

//    //最大值,最小值

//    self.slider.minimumValue=0.5;

//    self.slider.maximumValue=5;

//    [self.slider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged];

//    

//    

//    NSArray *arr=[[NSArray alloc] initWithObjects:@"1",@"2",@"3",nil];

//    self.seg=[[UISegmentedControl alloc] initWithItems:arr];

//    self.seg.frame=CGRectMake(280, 500, 100, 100);

//    self.seg.backgroundColor=[UIColor yellowColor];

//    [self.view addSubview:self.seg];

//    [_seg release];

//    

//    [self.seg addTarget:self action:@selector(segAction) forControlEvents:UIControlEventValueChanged];






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值