国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

小知識

2019-11-06 09:37:10
字體:
來源:轉載
供稿:網友
如果給

UIImageView 上面放一個button(或者其他的控件,需要添加手勢或者點擊事件)時,如果點擊的事件不觸發時

 我們需要把UIImageView與用戶的交互打開 

例如:

    UIImageView * Image = [[UIImageViewalloc]initWithFrame:CGRectMake(0,0,ScreenWidth, 215 *FitHeight)];

    Image.image = [UIImageimageNamed:@"userbackground@2x"];

    //imageView打開用戶交互

    Image.userInteractionEnabled = YES;

    [self.viewaddSubview:Image];

 //跳過按鈕

    UIButton *  SkipButton = [[UIButtonalloc]initWithFrame:CGRectMake(ScreenWidth - 70 * FitWidth,25 * FitHeight,50 * FitWidth,50 * FitHeight)];

    [SkipButton setTitle:@"跳過"forState:UIControlStateNormal];

    [SkipButton setTintColor:littleLabelColor];

    SkipButton.titleLabel.font =littleLabelFont;

    [SkipButton addTarget:selfaction:@selector(SkipButtonAction)forControlEvents:UIControlEventTouchUpInside];

    [BackgroundPicture addSubview:SkipButton];

#PRagma mark 跳過的點擊事件

-(void)SkipButtonAction{

    [self.navigationControllerpopViewControllerAnimated:YES];

    

}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平舆县| 武平县| 唐河县| 日喀则市| 昌都县| 信阳市| 铁力市| 岳阳市| 鄂州市| 达尔| 错那县| 镇雄县| 菏泽市| 南靖县| 宁德市| 上思县| 集安市| 开原市| 广西| 顺昌县| 莱芜市| 定边县| 彭水| 油尖旺区| 临海市| 涡阳县| 东乡县| 繁峙县| 仁化县| 上蔡县| 饶阳县| 华阴市| 武陟县| 斗六市| 黄石市| 平江县| 岫岩| 西贡区| 济宁市| 赤水市| 富平县|