ICode9

精准搜索请尝试: 精确搜索
  • IOS技术分享| anyRTC 互动白板场景实现2022-01-11 12:02:42

    前言 互动白板提供一整套完整的互动白板解决方案,客户端 SDK 覆盖 iOS、Android、Web 等主流平台,同时提供完整的服务端配套功能,可用于在线教育、在线会议、协作办公、在线互动娱乐等场景。 产品优势 超低延时 anyRTC 自研引擎和算法,减少传输冗余数据,白板操作延迟低至 100 ms,节约

  • swift UITableViewCell 绘制边框加圆角2021-12-06 17:31:40

    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { let cornerRadius: CGFloat = 10 cell.backgroundColor = UIColor.clear let layer = CAShapeLayer() let pathRef = CGMutablePath()

  • iOS tableView类似携程/美团城市筛选,自定义sectionIndex2021-09-18 17:31:26

    很多app中都需要城市选择,最近自己写了一个城市筛选、搜索功能,以及tableView双表联动,上拉自动至下一个分类,tableView的折叠布局。 Demo 传送门 一、双表联动 1、上拉至下一个分类    给rightTableView添加footRefresh 在刷新回调的时候进行操作,给leftTableView选中至当前的

  • iOS sizeForItemAtIndexPath方法在iOS14下变化2021-07-21 16:04:11

    对于UICollectionViewDelegateFlowLayout的sizeForItemAtIndexPath这个方法大家都很熟悉,这个代理方法就是返回每个item尺寸的方法 @protocol UICollectionViewDelegateFlowLayout <UICollectionViewDelegate> @optional - (CGSize)collectionView:(UICollectionView *)collectio

  • IOS中IndexPath2021-06-29 22:32:57

    在tableview中,indexPath可以理解为一个包含了两个信息的参数,row(第几行)和section(第几分区);比如在tableView中我们创建了3个分区(从0到2),每个分区有五个tableViewCell,也就是五行(从0到4),那么对于任意一个cell我怎么知道它是第几分区的第几行呢?比如:indexPath.section=2,indexPath.row=1,那

  • 快速滑动时 `cellForRow` 的调用次数2021-05-30 21:56:42

    快速滑动时 `cellForRow` 的调用次数 问题 有一个 1000 个 cell 的 tableView,刚刚进入界面时,contentOffset 为 0。用手快速滑动 tableView,直至最下面一个 cell 显示在屏幕上。 这个过程中,cellForRow 被调用了几次呢? 手写 demo 新建一个工程,只有一个 tableView,然后从上滚

  • iOS 优雅的处理网络数据,你真的会吗?不如看看这篇.2021-04-19 21:05:08

    本文同步发表于我的微信公众号,扫一扫文章底部的二维码或在微信搜索 HelloWorld杰少 即可关注。 相信大家平时在用 App 的时候, 往往有过这样的体验,那就是加载网络数据等待的时间过于漫长,滚动浏览时伴随着卡顿,甚至在没有网络的情况下,整个应用处于不可用状态。那么我们该怎么

  • ios swift tableView cell左滑删除:允许一部分cell可以左滑删除,一部分禁止左滑删除2020-11-26 21:28:51

    extension SelectRoutesVC: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 0 { self.selectaDestination!() self.dismiss(animated: true, comple

  • UICollectionView 01 - 基础布局篇2020-06-27 18:06:50

    一,代码: 1.布局方式设置,创建UICollectionView - (void)initailContentView { //导航 self.navigationBar = ({ CGFloat X = 0.0f; CGFloat Y = 0.0f; CGFloat W = [UIScreen mainScreen].bounds.size.width; CGFloat H = 44.f;

  • 浅析iOS开发中UITableViewCell的复用机制2020-06-25 16:01:32

    写在前面 UITableView是iOS开发中一种非常常用的组件,在主流App中几乎可以看到(微信和QQ的聊天列表等)。这篇文章主要探讨UITableView的数据载体——UITableViewCell的一些相关内容 UITableViewCell是什么 UITableViewCell就是UITableView展示数据的基本单位 可以理解为单元格 此处

  • iOS:自动适配tableViewCell的高度与缓存其高度,避免卡顿2020-06-24 10:03:28

    demo:https://github.com/ITHanYong/AutoTableViewCell.git #import "BaseViewController.h" @interface BaseViewController () @property (nonatomic, strong) NSMutableDictionary *heightAtIndexPath;//缓存高度 @end @implementation BaseViewController - (v

  • 动态加载实例NSSelectorFromString2020-06-23 16:06:15

    - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. _dataArray = [NSMutableArray array]; //不带参数的方法 // [_dataArray addObject:@[@"第一行",@"load1"]]; // [_dataArray addObject:@

  • IOS 控件UITableView 使用归纳总结2020-06-02 15:05:57

    1. UITableView简单使用 1. UITableView的基本使用     self.tableview.dataSource=self;     self.tableview.delegate=self;   -(NSInteger)numberOfSectionsInTableView:  返回多少组   -numberOfRowsInSection: 返回每组多少行,   有多少组,就调用多少次   -cellF

  • iOS表分区头和表视图的编辑模式2019-09-09 23:04:36

    原文链接:https://my.oschina.net/zyboy/blog/617427 设置分区头信息 -(NSString )tableView:(UITableView )tableView titleForHeaderInSection:(NSInteger)section 设置分区头视图 -(UIView )tableView:(UITableView )tableView viewForHeaderInSec

  • 自定义UITableViewCell2019-09-08 22:02:13

    原文链接:https://my.oschina.net/u/2598493/blog/552511 UITableView的强大更多程度上来自于可以任意自定义UITableViewCell单元格。 通常,UITableView中的Cell是 动态的,在使用过程中,会创建一个Cell池,根据每个cell的高度(即tableView:heightForRowAtInde

  • UItableview5--移动单元格位置2019-09-03 19:36:37

    //添加一个代理方法,用来响应单元格的删除事件 func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { /*如果编辑模式为删除,则执行之后的代码 if(editingStyl

  • iOS系列译文:整洁的表视图代码2019-06-24 09:52:38

    本文由 伯乐在线 - christian 翻译自 Florian Kugler。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。 表视图是一个非常万能的iOS应用程序构建模块。因此,有很多与表视图直接或间接相关的代码,包括提供数据、更新表视图、控制其行为和选择做出的反应,这仅仅是几个例子

  • IOS 创建NSIndexpath2019-06-13 15:00:53

            有时候需要根据tag来获取cell,需要创建NSIndexpath,我们可能会这么用: NSIndexPath *indexPath = [[NSIndexPath alloc] initWithIndex:tag]; 没有报错,但很遗憾的是通过这样的indexPath,你是怎么都获取不到cell的!正确的创建方法是:NSIndexPath *indexPath = [NSIndexPath in

  • iOS UITableview 刷新指定的某一个section或cell2019-06-13 10:42:54

    //某个section刷新    NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:2];   [tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];   //某个cell刷新    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:1 inSe

  • UITableViewCell的多选操作2019-05-02 13:44:14

    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {     return UITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;//3 } 或者·     self.tableview.allo

  • IOS tableview 使用2019-04-13 13:52:08

    1 tablecell 2 tableview 3 [self.tableView registerNib:[UINib nibWithNibName:@"ParkCell" bundle:nil] forCellReuseIdentifier:@"cellID"]; self.tableView.delegate = self; self.tableView.dataSource = self; [self.tableView reloadDat

  • IOS开发学习周报(三)2019-04-08 17:48:36

    IOS开发学习周报(三) 简介 课程名称 IOS开发实训 任课老师 郑贵锋老师&字节跳动工程师 学号 16340015 专业(方向) 软件工程(计应) 姓名 陈彬彬 Email 944131226@qq.com 开始日期 2019/03/30 完成日期 2019/04/05 文章目录IOS开发学习周报(三)简介本周概括学习记

  • [Swift]键盘遮挡2019-04-04 09:42:36

    键盘遮挡控件: 1 super.viewDidLoad(){ 2 // Do any additional setup after loading the view, typically from a nib. 3 //监听键盘弹出通知 4 NotificationCenter.default.addObserver(self,selector: #selector(keyboardWillShow(_:)), name:UIResponder.keyb

  • Swift相册照片选择-支持单选或多选2019-03-25 17:49:33

    //// NAPublishAlbumTableViewController.swift////// Created by on 2019/3/23.// Copyright © 2019年 . All rights reserved.//import UIKitimport Photostypealias HandlePhotos = ([PHAsset], [UIImage]) -> Voidclass HandleSelectionPhotosManager: NSObject {

  • Swift - UISplitViewController2019-01-31 12:41:52

    https://blog.csdn.net/weixin_43704791/article/details/86424080 2019年01月13日    AppDelegate中:     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {         //

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有