久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值

get index or tag value from imageview tap gesture(從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值)
本文介紹了從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

這是我們搜索任何應(yīng)用時(shí)來(lái)自應(yīng)用商店的圖片.我還想添加相同的滾動(dòng)視圖概念,在該概念中它顯示當(dāng)前圖像以及上一個(gè)和下一個(gè)圖像的小預(yù)覽.我能夠在 示例代碼.但是沒(méi)有找到當(dāng)用戶點(diǎn)擊任何圖像時(shí)如何獲取索引或標(biāo)記值的任何解決方案.這樣我就可以打開每個(gè)圖像的詳細(xì)信息頁(yè)面.如果有人對(duì)此有任何想法,請(qǐng)幫助我.

This is the image from app store whenever we search for any app. I also want to add the same scrollview concept in which it show the currentimage with small preview of previous and next image. I am able to make this view with the help of Sample code. But didn't find any solution that how to get index or tagvalue when user tap any of the image. So that I would be able to open the detail page for each image. If Someone has idea about this please help me.

提前致謝.

推薦答案

將手勢(shì)識(shí)別器添加到必要的圖像視圖中:

Add gesture recognizer to the necessary image view:

UITapGestureRecognizer *frameTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(frameTapGesture:)];
[_imgView addGestureRecognizer:frameTapGesture];

然后在手勢(shì)處理程序中訪問(wèn)附加到的視圖手勢(shì)識(shí)別器:

Then in the gesture handler get access to the view gesture recognizer attached to:

- (void)frameTapGesture:(UITapGestureRecognizer*)sender
{
    UIView *view = sender.view; //cast pointer to the derived class if needed
    NSLog(@"%d", view.tag);
}

這篇關(guān)于從 imageview 點(diǎn)擊手勢(shì)獲取索引或標(biāo)簽值的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

iOS - Using storyboard and autolayout to center the UIScrollView(iOS - 使用故事板和自動(dòng)布局使 UIScrollView 居中)
UIScrollView not scrolling regardless of large contentSize(無(wú)論內(nèi)容大小如何,UIScrollView 都不會(huì)滾動(dòng))
Clean autorotation transitions in a paging UIScrollView(清除分頁(yè) UIScrollView 中的自動(dòng)旋轉(zhuǎn)轉(zhuǎn)換)
UIScrollView zooming with Auto Layout(UIScrollView 使用自動(dòng)布局縮放)
How to create an image from a UIView / UIScrollView(如何從 UIView/UIScrollView 創(chuàng)建圖像)
iOS/Swift - Hide/Show UITabBarController when scrolling down/up(iOS/Swift - 向下/向上滾動(dòng)時(shí)隱藏/顯示 UITabBarController)
主站蜘蛛池模板: 欧美一区二区在线 | 日韩欧美国产精品一区二区 | 欧美人妖网站 | 97av视频在线 | 日韩一区二区黄色片 | 伊人在线 | 欧美精品一二区 | 中文字幕免费观看 | 亚洲午夜精品一区二区三区他趣 | 国产女人叫床高潮大片免费 | 成人av免费网站 | 久久精品中文字幕 | 成年人在线观看视频 | 中文字幕免费中文 | 欧州一区二区 | 东京av男人的天堂 | 国产精品久久久久一区二区三区 | 久久综合九九 | 国产免费福利小视频 | 男女免费观看在线爽爽爽视频 | 日本aa毛片a级毛片免费观看 | 91视视频在线观看入口直接观看 | 国产成在线观看免费视频 | 日韩在线不卡 | 久久久久99 | 久久久久国产 | 夜夜草导航 | 91在线精品秘密一区二区 | 国产一区二区三区色淫影院 | 欧美自拍另类 | 无码一区二区三区视频 | 国产一区二区自拍 | 欧美一区二区三区在线观看 | 久久精品一区 | 成人毛片网站 | 欧美二区在线 | 在线视频亚洲 | 人人鲁人人莫人人爱精品 | 一区视频在线播放 | 久久国产成人午夜av影院武则天 | www.四虎.com |