做iOS很久了,发现竟然从来没用过UITableView的多选功能,前段时间项目需要做多选操作,从网上调研了一下发现很多都是自定义的多选,这就会误导很多新手认为系统没有提供多选的功能,趁着周末做了一个演示demo
下图是编辑状态下的多选截图
下图是正常状态下的多选
好了上github地址https://github.com/zengqingf/UITableView_MultiSelect
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
1.7k累计阅读
1.7k平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄11年
做iOS很久了,发现竟然从来没用过UITableView的多选功能,前段时间项目需要做多选操作,从网上调研了一下发现很多都是自定义的多选,这就会误导很多新手认为系统没有提供多选的功能,趁着周末做了一个演示demo
下图是编辑状态下的多选截图
下图是正常状态下的多选
好了上github地址https://github.com/zengqingf/UITableView_MultiSelect
ios-UItableViewCell自定义多选的cell.zip
这个是同学项目需求,然后自己自定义了一个多选择的cell的东西了
UITableView实现多选
UITableView是我们平时常用的一个控件。 实现多选也是有简便的方法 第一步是设置tableView可以多选 在返回cell的方法里设置cell的辅助视图的样式 tableView被选择就改变辅助视图 在tableView不被选择的时候把辅助视图去掉 这样就简单的实现了多选的功能
iOS tableView实现单选和多选的实例代码
本篇文章主要介绍了iOS tableView实现单选和多选的实例代码,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
UITableViewCell的多选操作
版权声明:本文为博主原创文章。未经博主同意不得转载,转载需加上原博客链接。 https://blog.youkuaiyun.com/panyong4627/article/details/37902207 ...
Anylabeling与SAM协同:从智能标注到YOLO数据集构建的完整实践
本文详细介绍了Anylabeling与SAM协同标注的完整实践,从智能标注到YOLO数据集构建的全流程。通过结合SAM的自动分割能力和Anylabeling的交互式标注,显著提升标注效率,特别适合小样本、复杂形状和多类别标注场景。文章还提供了环境搭建、标注优化技巧以及YOLO格式转换的实用指南。
Gemma 4 12B QAT+MTP小显存部署实战指南
大语言模型本地部署的核心瓶颈在于显存与推理效率的平衡。量化感知训练(QAT)通过在训练阶段模拟低精度计算,显著提升模型对INT4量化的鲁棒性;多令牌预测(MTP)则通过并行解码优化KV Cache复用,降低GPU kernel调用频次。二者协同可在8GB显存设备上稳定运行12B级模型,兼顾精度、速度与上下文长度。该方案适用于开发者本地AI助手、技术文档生成、SQL翻译等轻量但高交互需求场景,是当前Windows环境中小显存高效落地Gemma系列模型的工程最优解。
UITableview cell 的多选
利用NSMutableDictionary key值 来改变cell的状态 -(void)createUI{ table = [[UITableView alloc]initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bou...
本地部署静态网站托管平台 Netlify 并实现外部访问(Windows 版本)
Netlify 是一款基于云计算的网站部署和托管平台,专为开发者提供便捷的静态网站和 Jamstack 应用部署服务。它的能力在于将网站构建、部署、托管以及持续集成等流程高度集成,简化了开发和运维的复杂程度。用户无需关心服务器的配置、维护等工作。本文将详细介绍如何在本地安装 Netlify 以及结合路由侠内网穿透实现外网访问 Netlify。
UITableView的多选
关于UITableView的多选 UITableView只要界面有重新刷新都会触发- (UITableViewCell *)tableViewUITableView *)tableView cellForRowAtIndexPathNSIndexPath *)indexPath 这个函数。当选中TableView中的某一行时,触发该函数:- (void)tableViewUITableVie
离线安装 nvidia-docker2(nvidia-container-toolkit)
很多时候大家都有用docker使用gpu的需求,但是因为网络等原因不是那么好用,这里留了一个给ubuntu的安装包,网络好的话也提供了在线安装方式。
二、基于C语言的JPEG解码代码详解
// JPEG解码 // 输入JPEG后输出Bitmap #include <stdio.h> #include <stdlib.h> #pragma warning(disable : 4996) unsigned int BuffIndex; // JPEG数据的位置 unsigned int BuffSize; // JPEG数据的大小 unsigned int BuffX; // 图像的横向尺寸 unsigned int BuffY; //
iOS开发之--UITableView(分区)自定义多选效果
为了使用你提供的复杂数据源结构来构建多选列表,我们需要解析数据源并动态生成表格视图的内容。以下是具体的实现步骤和代码示例。数据源结构假设你的数据源结构如下:登录后复制 { "data": [ { "initial": "A", "data": [ { ...
第二十届全国大学生智能车竞赛-地瓜机器人智慧医疗挑战赛技术解析与实战指南
本文深入解析了第二十届全国大学生智能车竞赛-地瓜机器人智慧医疗挑战赛的核心技术。内容涵盖从零搭建数字孪生环境、实现AI视觉任务(二维码识别、引导线追踪、目标检测)、在边缘设备部署轻量化大模型进行图生文描述,到遥操作与自主控制的平滑切换,并提供了基于ROS2的系统集成与赛场实战指南,助力参赛者高效备赛。
UITableView类似Email的多选删除功能实现
参考了http://www.cocoawithlove.com/2009/01/multiple-row-selection-and-editing-in.html的实现方法,我从他的方法中提取了最生要的部份,过滤了多余的部份,使代码容易读懂。 原理就是自定义UITableViewCell,在Cell的contentView的最左边放UIImageView,当cell选中的时候,cell的con
零基础学simulink仿真建模--基于Simulink进行近端策略优化(PPO)路径规划的仿真建模
特点高效性与稳定性:通过引入剪裁机制,在更新策略时限制步长,从而提高了训练过程的稳定性和效率。适用于多种动作空间:可以处理连续和离散的动作空间问题。无需模型:不需要预先知道环境的确切模型,适合复杂或未知环境。挑战收敛速度与稳定性:确保算法能够在合理的时间内找到近似最优解,并保持训练过程的稳定性。探索与利用平衡:在探索新路径和利用已知信息之间取得平衡。计算资源:对于大规模状态空间和动作空间,计算资源需求较高。首先明确要模拟的任务内容。目标(例如到达指定地点、避开障碍物等)。
华为OD机试双机位C卷-组装新的数组(Py/Java/C/C++/Js/Go)
华为OD机试(机考)双机位C卷 【组装新的数组】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试 - 组装新的数组。
SKTagView高级定制教程:从基础样式到复杂交互的完整实现
SKTagView是一个功能强大的iOS标签视图库,专为iOS应用开发者设计,提供灵活高效的标签展示方案。这个开源项目基于Autolayout构建,支持单行和多行模式,让开发者能够轻松创建美观的标签界面。无论你是需要构建兴趣标签、分类筛选还是内容标签化展示,SKTagView都能满足你的需求。 ## 🚀 SKTagView的核心优势 SKTagView相比传统的标签实现方式有几个显著优势。首
NTscan扫描工具
ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。
UITableViewCell 添加 checkbox 多选
UITableViewCell 添加 checkbox 多选
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
ssm框架搭建
这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载
UITableViewCell 添加 checkbox 多选 (二)
UITableViewCell 添加 checkbox 多选 (二)
OV9734 DATASHEET,完整规格书
OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等
UITableView多选Cell操作
先新建一个项目,命名为UITableViewDemo,storyboard中拖入一个UITableViewController,然后新建一个继承自UITableViewController的类,命名为UDTableViewController。在storyboard中将拖入的UITableViewController的Custom Class,Class设置为刚刚新建的UDTableViewCon
深挖UITableViewCell-编辑多选模式下,引发的深思
前言 在移动端日常开发中,列表**UITableView**的使用频率非常高,而TableView里主要用的就是UITableViewCell,不管是自定义cell,还是系统的cell,还是后期为了优化列表,都离不开操作cell,那么UITableViewCell就有必要研究一下了;至于为什么要整理一篇关于Cell的文章,因为,搜了一下关于cell的文章,基本都是把头文件里面的...
iPhone实现自定义多选列表
首先我们先来看一下效果图: 一般大家都是用UITableView自己的编辑模式来实现CheckBox的,这里我们用自定义Cell和两张图片来实现,一张是未选中,一张是选中的图片 好了,我们首先来看一下代码:首先在Cell中定义了三个控件,两个UILabel和一个UIImageView [java] view plaincopy #import @inte
Swift - tableView的单元格多选功能的实现(获取多选值、多选删除)
有时候在我们应用中需要用到表格(tableView)的多选功能。其实 tableView 已自带了多种多选功能,不用借助第三方组件也可以实现。下面分别进行介绍。 方法1,自定义一个数组保存选中项的索引(非编辑状态) (1)我们先定义一个数组,表格在非编辑状态时,点击某个单元格便将其索引添加到这个数组中。同时将单元格尾部打勾表示选中状态。再次点击原来选中的单元格,则取消选中状
UITableViewCell使用cell和cell.contentView的区别
1、addSubview 在UITableViewCell实例上添加zi'shi'tu
UITableViewCell(单选、多选)
UITableViewCell的单选多选

被折叠的 条评论
为什么被折叠?



