国产探花免费观看_亚洲丰满少妇自慰呻吟_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];

    

}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 曲沃县| 黑山县| 黔江区| 安顺市| 柳江县| 恩平市| 奇台县| 叶城县| 台山市| 会理县| 基隆市| 九龙坡区| 高安市| 会昌县| 丹寨县| 南安市| 西和县| 沂南县| 上高县| 衢州市| 鄂州市| 蒙阴县| 扬中市| 玉山县| 安达市| 东港市| 米林县| 西林县| 西乌珠穆沁旗| 河西区| 安义县| 朝阳区| 荆州市| 柯坪县| 樟树市| 天柱县| 深水埗区| 汾西县| 陇西县| 金川县| 建水县|