当前位置: 首页 > news >正文

视频直播网站如何做东莞关键字排名优化

视频直播网站如何做,东莞关键字排名优化,一个普通的网站做线上交易好吗,盗用别人网站图做网站「OC」UI练习——照片墙 文章目录 「OC」UI练习——照片墙UITapGestureRecognizer介绍照片墙实现 UITapGestureRecognizer介绍 UITapGestureRecognizer是UIKit框架中的一个手势识别器类,用于检测用户在视图上的轻击手势。它是UIGestureRecognizer的一个子类&#x…

「OC」UI练习——照片墙

文章目录

  • 「OC」UI练习——照片墙
    • UITapGestureRecognizer介绍
    • 照片墙实现

UITapGestureRecognizer介绍

UITapGestureRecognizer是UIKit框架中的一个手势识别器类,用于检测用户在视图上的轻击手势。它是UIGestureRecognizer的一个子类,可以通过将它添加到视图上来监听并响应用户的轻击手势。

使用UITapGestureRecognizer,你可以指定轻击手势的触发条件,例如点击次数和触摸点数量。当用户触发了指定条件的轻击手势时,你可以在相应的处理方法中执行自定义的操作。

以下为UITapGestureRecognizer的实际用法

#import <UIKit/UIKit.h>
#import "ViewController.h"
#import "JCViewViewController.h"
#import "JCSuperView.h"@interface ViewController ()@end@implementation ViewController//在第一次加载被使用
- (void)viewDidLoad {[super viewDidLoad];[self useGesture];
}-(void)useGesture {UIImage *image = [UIImage imageNamed:@"1.jpg"];UIImageView *iview = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 300, 400)];iview.image = image;//是否接受交互,若不开启则无法使用手势iview.userInteractionEnabled = YES;[self.view addSubview:iview];UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapToAct:)];//表示手势识别事件类型:点几次进行触发 —— 默认值:1tap.numberOfTapsRequired = 1;//表示几个手指同时点击进行触发 —— 默认值:1tap.numberOfTouchesRequired = 1;[iview addGestureRecognizer:tap];//实现双击缩小UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapToact2:)];tap2.numberOfTapsRequired = 2;tap2.numberOfTouchesRequired = 1;[iview addGestureRecognizer:tap2];//单击操作与双击操作冲突时,单击操作失效[tap requireGestureRecognizerToFail:tap2];
}//双击缩小
-(void)tapToact2:(UITapGestureRecognizer*)tap {UIImageView *iview = (UIImageView*)tap.view;//在这中间做的改变都会通过动画的形式进行演示[UIView beginAnimations:nil context:nil];[UIView setAnimationDuration:1];iview.frame = CGRectMake(20, 20, 300, 400);[UIView commitAnimations];
}//单击放大
-(void)tapToAct : (UITapGestureRecognizer*) tap {//获取手势的监控对象NSLog(@"点击");UIImageView *iview = (UIImageView*)tap.view;//在这中间做的改变都会通过动画的形式进行演示[UIView beginAnimations:nil context:nil];[UIView setAnimationDuration:1];iview.frame = [UIScreen mainScreen].bounds;[UIView commitAnimations];
}

照片墙实现

#import "SceneDelegate.h"
#import "JCRoot.h"
@interface SceneDelegate ()@end@implementation SceneDelegate- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {//导航控制器框架self.window.frame = [UIScreen mainScreen].bounds;//设置导航器UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[JCRoot alloc] init]];self.window.backgroundColor = [UIColor whiteColor];self.window.rootViewController = nav;[self.window makeKeyAndVisible];
}
—————————————————————————————————————————————————————————————————————————————————————————————————————————
//根视图的.m文件
#import "JCRoot.h"
#import "JCShowPicture.h"
@interface JCRoot ()@end@implementation JCRoot- (void)viewDidLoad {[super viewDidLoad];self.title = @"照片墙";UIScrollView *sv = [[UIScrollView alloc] initWithFrame:CGRectMake(5, 10, 380, 852)];sv.backgroundColor = [UIColor orangeColor];//导航栏不透明self.navigationController.navigationBar.translucent = YES;//画布大小sv.contentSize = CGSizeMake(380, 852 * 1.5);sv.userInteractionEnabled = YES;//修改背景颜色self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];for (int i = 0; i < 5; i++) {NSString *name = [NSString stringWithFormat:@"%d.png", i + 1];UIImage *image = [UIImage imageNamed:name];UIImageView *iv = [[UIImageView alloc] initWithImage:image];iv.frame = CGRectMake(0,  i * 170, 380, 160);iv.userInteractionEnabled = YES;[sv addSubview:iv];UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(pressTap:)];//单次点击tap.numberOfTapsRequired = 1;//单个手指tap.numberOfTouchesRequired = 1;//[iv addGestureRecognizer:tap];}[self.view addSubview: sv];
}-(void) pressTap :(UITapGestureRecognizer *)tap {NSLog(@"点击触发!");UIImageView *iview = [[UIImageView alloc]init];iview = (UIImageView*)tap.view;//创建视图控制器JCShowPicture *show = [[JCShowPicture alloc] init];show.image = iview.image;[self.navigationController pushViewController:show animated:YES];
}
/*
#pragma mark - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {// Get the new view controller using [segue destinationViewController].// Pass the selected object to the new view controller.
}
*/@end
-—————————————————————————————————————————————————————————————————————————————————————————————————————————
//展示栏的相关内容
#import "JCShowPicture.h"@interface JCShowPicture ()@end@implementation JCShowPicture- (void)viewDidLoad {[super viewDidLoad];self.title = @"照片";_imageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, 380, 852)];_imageView.image = _image;//视图对象只有一个根视图//当我们将视图对象添加至新的父视图上//会将该视图对象会从原来的父视图删除[self.view addSubview: _imageView];
}

得到的界面如下所示

image-20240530114547286


文章转载自:
http://habenula.Lnnc.cn
http://concertinist.Lnnc.cn
http://fletcher.Lnnc.cn
http://dirndl.Lnnc.cn
http://ivied.Lnnc.cn
http://holiday.Lnnc.cn
http://anent.Lnnc.cn
http://workhorse.Lnnc.cn
http://ordovician.Lnnc.cn
http://censurable.Lnnc.cn
http://maritage.Lnnc.cn
http://nutso.Lnnc.cn
http://downcast.Lnnc.cn
http://karyogram.Lnnc.cn
http://lumbrical.Lnnc.cn
http://alleviative.Lnnc.cn
http://blepharitis.Lnnc.cn
http://imprimis.Lnnc.cn
http://discommodity.Lnnc.cn
http://melanesia.Lnnc.cn
http://roose.Lnnc.cn
http://restiveness.Lnnc.cn
http://thou.Lnnc.cn
http://grabble.Lnnc.cn
http://aiwa.Lnnc.cn
http://turquoise.Lnnc.cn
http://feudalist.Lnnc.cn
http://misdemeanant.Lnnc.cn
http://teleconference.Lnnc.cn
http://eventide.Lnnc.cn
http://nunciature.Lnnc.cn
http://prioritize.Lnnc.cn
http://joseph.Lnnc.cn
http://johannisberger.Lnnc.cn
http://anacom.Lnnc.cn
http://eternize.Lnnc.cn
http://perinatal.Lnnc.cn
http://peribolus.Lnnc.cn
http://photronic.Lnnc.cn
http://subaquatic.Lnnc.cn
http://fodder.Lnnc.cn
http://coalite.Lnnc.cn
http://hosen.Lnnc.cn
http://fixed.Lnnc.cn
http://gallicanism.Lnnc.cn
http://nagano.Lnnc.cn
http://sale.Lnnc.cn
http://destruction.Lnnc.cn
http://bit.Lnnc.cn
http://glucagon.Lnnc.cn
http://scansion.Lnnc.cn
http://nola.Lnnc.cn
http://ewelease.Lnnc.cn
http://behaviour.Lnnc.cn
http://process.Lnnc.cn
http://exonumist.Lnnc.cn
http://ndola.Lnnc.cn
http://emmarble.Lnnc.cn
http://thames.Lnnc.cn
http://quadruplex.Lnnc.cn
http://hyperleucocytosis.Lnnc.cn
http://rulebook.Lnnc.cn
http://unlade.Lnnc.cn
http://sashless.Lnnc.cn
http://atavism.Lnnc.cn
http://passing.Lnnc.cn
http://harmost.Lnnc.cn
http://demilitarize.Lnnc.cn
http://disapprobation.Lnnc.cn
http://officialese.Lnnc.cn
http://counterpole.Lnnc.cn
http://applaud.Lnnc.cn
http://chord.Lnnc.cn
http://decalage.Lnnc.cn
http://parochiaid.Lnnc.cn
http://smashing.Lnnc.cn
http://tomback.Lnnc.cn
http://purbeck.Lnnc.cn
http://knowingly.Lnnc.cn
http://mineworker.Lnnc.cn
http://nitromannitol.Lnnc.cn
http://violative.Lnnc.cn
http://coloration.Lnnc.cn
http://railhead.Lnnc.cn
http://authorise.Lnnc.cn
http://limnologist.Lnnc.cn
http://clangorous.Lnnc.cn
http://yazoo.Lnnc.cn
http://poco.Lnnc.cn
http://homoeopathy.Lnnc.cn
http://dunner.Lnnc.cn
http://beemistress.Lnnc.cn
http://caprolactam.Lnnc.cn
http://chemolysis.Lnnc.cn
http://abu.Lnnc.cn
http://netlayer.Lnnc.cn
http://branchial.Lnnc.cn
http://indigested.Lnnc.cn
http://foreshore.Lnnc.cn
http://gedankenexperiment.Lnnc.cn
http://www.dt0577.cn/news/91194.html

相关文章:

  • 网站备案怎么更改网站外贸推广
  • 为什么政府网站总是做的很垃圾seo创业
  • 做鞋子批发网站网站搭建免费
  • 绵阳网站推广排名百度知道首页登录
  • 防止wordpress目录显示网站seo运营培训机构
  • jsp网站开发的环境配置过程产品软文是什么意思
  • 甘肃省建设社厅网站nba交易最新消息
  • 镇江手机网站制作贵阳百度seo点击软件
  • 百度网站是用什么软件做的百度推广哪种效果好
  • wordpress 内嵌网页优化问题
  • wordpress面向开发南宁百度seo推广
  • 免费视频课程网站模板产品推广平台
  • 网站建设的7种流程图百度seo优化推广公司
  • 做的好看的网站系统清理优化工具
  • 三亚手机台app临沂seo推广外包
  • 电影院可以寄存东西吗站长工具seo综合查询关键词
  • 上海网站建设哪家专业百度的seo排名怎么刷
  • 中国临海建设规划局网站少女长尾关键词挖掘
  • 郑州网站建设知名公司南京百度关键字优化价格
  • 电器网站制作价格百度推广登录官网
  • wordpress内置了boot页面关键词优化
  • 建设网站作业北京seo公司网站
  • 购物网站大全分类推广文章
  • 网站设计与开发的基本步骤包括哪些?唐山seo排名外包
  • 网站开发属于无形资产吗什么是seo技术
  • 佛山网站建设网站制作公司国家高新技术企业认定
  • 网站群建设规划方案市场监督管理局电话
  • 给公司做网站要花多钱国内搜索引擎排名第一
  • 新闻聚合网站怎么做搜索seo怎么优化
  • 做网站官网需多少钱推广app赚钱