iOS中UICollectionView及其常用方法

无源元器件-电容选型参数总结 电容选型时,需要考虑的参数多种多样,这些参数的选择会直接影响到电路的性能、稳定性、成本等多个方面。本文对电阻电容磁珠电感的参数进行详细介绍并总结。 阅读详情

本章通过先总体介绍UICollectionView及其常用方法,再结合一个实例,了解如何使用UICollectionView。

 

UICollectionView 和 UICollectionViewController 类是iOS6 新引进的API,用于展示集合视图,布局更加灵活,可实现多列布局,用法类似于UITableView 和 UITableViewController 类。

使用UICollectionView 必须实现UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout这三个协议。

 

下面先给出常用到的一些方法。(只给出常用的,其他的可以查看相关API) 

  1. #pragma mark -- UICollectionViewDataSource   
  1. //定义展示的UICollectionViewCell的个数  
  2. -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section  
  3. {  
  4.     return 30;  
  5. }   
  1. //定义展示的Section的个数  
  2. -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView  
  3. {  
  4.     return 1;  
  5. }   
  1. //每个UICollectionView展示的内容  
  2. -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath  
  3. {  
  4.     static NSString * CellIdentifier = @"GradientCell";  
  5.     UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];  
  6.   
  7.     cell.backgroundColor = [UIColor colorWithRed:((10 * indexPath.row) / 255.0) green:((20 * indexPath.row)/255.0) blue:((30 * indexPath.row)/255.0) alpha:1.0f];  
  8.     return cell;  
  9. }   
  1. #pragma mark --UICollectionViewDelegateFlowLayout   
  1. //定义每个UICollectionView 的大小  
  2. - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath  
  3. {  
  4.     return CGSizeMake(96, 100);  
  5. }   
  1. //定义每个UICollectionView 的 margin  
  2. -(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section  
  3. {  
  4.     return UIEdgeInsetsMake(5, 5, 5, 5);  
  5. }   
  1. #pragma mark --UICollectionViewDelegate   
  1. //UICollectionView被选中时调用的方法  
  2. -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath  
  3. {  
  4.     UICollectionViewCell * cell = (UICollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];  
  5.     cell.backgroundColor = [UIColor whiteColor];  
  6. }   
  1. //返回这个UICollectionView是否可以被选择  
  2. -(BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath  
  3. {  
  4.     return YES;  
  5. }  

 

 

 

下面通过一个例子具体介绍下。(例子来自网络。但是是通过第三方获得的,无法取得链接。还望见谅。)

 

iOS CollectionView的出现是一大福利,再也不用用TableView来定义复杂的多栏表格了,用法与Table类似,只是Cell必须自己添加,无默认模式

由于CollectionView没有默认的Cell布局,所以一般还是自定义方便又快捷

一、自定义Cell

1、新建类CollectionCell继承自UICollectionViewCell

2、新建Xib,命名为CollectionCell.xib

a.选中CollectionCell.xib删掉默认的View,从控件中拖一个Collection View Cell(图3)到画布中,设置大小为95*116;

 

b.选中刚刚添加的Cell,更改类名为CollectionCell,如图4

c.在CollectionCell.xib的CollectionCell中添加一个ImageView和一个Label(图5)

d.创建映射, 图6,图7

e.选中CollectionCell.m , 重写init方法 

  1. - (id)initWithFrame:(CGRect)frame  
  2. {  
  3.     self = [super initWithFrame:frame];  
  4.     if (self)  
  5.     {  
  6.         // 初始化时加载collectionCell.xib文件  
  7.         NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"CollectionCell" owner:self options:nil];  
  8.           
  9.         // 如果路径不存在,return nil  
  10.         if (arrayOfViews.count < 1)  
  11.         {  
  12.             return nil;  
  13.         }  
  14.         // 如果xib中view不属于UICollectionViewCell类,return nil  
  15.         if (![[arrayOfViews objectAtIndex:0] isKindOfClass:[UICollectionViewCell class]])  
  16.         {  
  17.             return nil;  
  18.         }  
  19.         // 加载nib  
  20.         self = [arrayOfViews objectAtIndex:0];  
  21.     }  
  22.     return self;  
  23. }  


f.选中CollectionCell.xib 修改其identifier为CollectionCell。


二、定义UICollectionView;

1、拖动一个Collection View到指定ViewController的View上

2、连线dataSource和delegate,并创建映射,命名为CollectionView

3、选中CollectionView的标尺,将Cell Size的Width和Height改成与自定义的Cell一样的95*116,图8

    

4、选中CollectionView的属性,可以修改其属性,比如是垂直滑动,还是水平滑动,选择Vertical或Horizontal

5、选中CollectionViewCell,修改Class,继承自CollectionCell

5、在ViewDidLoad方法中声明Cell的类,在ViewDidLoad方法中添加,此句不声明,将无法加载,程序崩溃

其中,CollectionCell是这个Cell的标识(之前几步已经定义过了。 ) 

  1. [self.collectionView registerClass:[CollectionCell class] forCellWithReuseIdentifier:@"CollectionCell"];  


6、在ViewController.h中声明代理 

  1. @interface ViewController : UIViewController<UICollectionViewDataSource,UICollectionViewDelegate>  



 

7、在.m文件中实现代理方法 

  1. //每个section的item个数  
  2. -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section  
  3. {  
  4.     return 12;  
  5. }  
  6.   
  7. -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath  
  8. {  
  9.       
  10.     CollectionCell *cell = (CollectionCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"CollectionCell" forIndexPath:indexPath];  
  11.       
  12.     //图片名称  
  13.     NSString *imageToLoad = [NSString stringWithFormat:@"%d.png", indexPath.row];  
  14.     //加载图片  
  15.     cell.imageView.image = [UIImage imageNamed:imageToLoad];  
  16.     //设置label文字  
  17.     cell.label.text = [NSString stringWithFormat:@"{%ld,%ld}",(long)indexPath.row,(long)indexPath.section];  
  18.       
  19.     return cell;  
  20. }  



 

8 。效果如图10

点击某项后跳转事件与UITableView类似,实现代理方法 

  1. -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath  

即可,不赘述

BP神经网络回归预测+SHAP可解释分析+新数据预测(MATLAB完整源码) 阅读详情

相关推荐

【论文阅读】AU检测|《Deep Adaptive Attention for Joint Facial Action Unit Detection and Face Alignment》

摘要 本文旨在从大量没有人工标注的视频中学习用于面部动作单元检测的区分表示。受面部动作是面部肌肉运动这一事实的启发,论文将这些运动描述为不同帧中两幅面部图像之间的转换,并将其用作学习表示的自我监控信号。但是,在不受控制的情况下,这种转换是由面部动作和头部运动引起的。为了消除头部运动的影响,我们提出了一个双圈自动编码器(TCAE),它可以解开面部动作相关运动和头部运动相关运动。具体而言,TCAE被训练成分别将源面部的面部动作和头部姿态改变为目标面部的面部动作和头部姿态。我们的实验验证了TCAE解耦运动的能力。

Celine的博客 4563

iOS开发- UICollectionView详解+实例

本章通过先总体介绍UICollectionView及其常用方法,再结合一个实例,了解如何使用UICollectionView。   UICollectionView 和 UICollectionViewController 类是iOS6 新引进的API,用于展示集合视图,布局更加灵活,可实现多列布局,用法类似于UITableView 和 UITableViewController 类。 使用...

weixin_33928467的博客 332

LabVIEW内存优化实战:用DVR和队列高效处理大型数组,告别数据副本

本文深入探讨LabVIEW内存优化技术,重点介绍数据值引用(DVR)和单元素队列(SEQs)在高效处理大型数组中的应用。通过对比传统方法与现代引用技术的性能差异,提供减少内存副本、提升程序效率的实战方案,帮助开发者在测试测量、图像处理等数据密集型场景中实现显著性能提升。

weixin_30835649的博客 1065

UICollectionView 实际使用

我想的书架是那种每一排都可以滑动的。暂时的想法是使用两个collectionView,第一个collectionView布置书架的每一排,第二个布置每一排内部的书。

m0_63852285的博客 984

嵌入式GUI框架深度对比:LVGL、emWin、Qt、TouchGFX、AWTK、MiniGUI选型指南

在嵌入式系统开发中,图形用户界面(GUI)框架的选择直接影响产品的交互体验与开发效率。其核心原理在于通过图形库管理屏幕绘制、事件处理和内存资源,在资源受限的微控制器(MCU)上实现高效渲染。GUI框架的技术价值在于平衡性能、内存占用与视觉效果,为智能设备提供流畅的人机交互界面。典型应用场景包括智能家居中控屏、工业HMI、医疗设备和汽车仪表盘等。本文聚焦于嵌入式GUI选型,深入剖析LVGL、emWin/STemWin、Qt for MCUs、TouchGFX、AWTK和MiniGUI六款主流框架,结合内存管理

weixin_29168153的博客 377

AUTO-DL平台快速部署BEVFormer:Nuscenes数据集完整训练避坑指南

本文详细介绍了在AUTO-DL平台高效部署BEVFormer模型并利用Nuscenes数据集进行完整训练的实战指南。重点解析了平台数据管理、环境配置、数据集迁移解压、预处理及训练启动等全流程中的关键步骤与常见避坑技巧,帮助研究者和工程师快速复现这一前沿视觉感知模型,节省云端训练时间与成本。

weixin_29188043的博客 339

UICollectionViewController

1、collectionView 的创建 1.1 ViewController.m 遵守协议 UICollectionViewDataSource, UICollectionViewDelegate // 数据源初始化 // 声明数据源 @property(nonatomic, retain)NSMutableArray *myDataArray; myDataArray = ...

diaochuanzhi7826的博客 353

中国大学MOOC-翁恺-C语言程序设计习题集-解答汇总

中国大学MOOC-翁恺-C语言程序设计习题集 PAT 习题集 02-0. 整数四则运算(10) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 乔林(清华大学) 本题要求编写程序,计算2个正整数的和、差、积、商并输出。题目保证输入和输出全部在整型范围内。 输入格式: 输入在一行中给出2...

weixin_30691871的博客 3万+

【iOS】UICollectionView使用

总结了UICollectioinView的基本使用、参差瀑布流式和圆环式布局。其实算是特殊Flow布局的UITableView,但简单的列表仍可以使用UITableViewUICollectionView最大的优势就是通过自定义Layout,实现cell的布局,整体的思路就是:通过一些几何计算,设置好每个item的布局位置和大小一篇较为详细的 UICollectionView 使用方法总结

XY_Mckevince的博客 3192

GD32H757的can通信配置,提供方案参考!

🏆本文收录于 《全栈 Bug 调优(实战版)》 专栏。专栏聚焦真实项目中的各类疑难 Bug,从成因剖析 → 排查路径 → 解决方案 → 预防优化全链路拆解,形成一套可复用、可沉淀的实战知识体系。无论你是初入职场的开发者,还是负责复杂项目的资深工程师,都可以在这里构建一套属于自己的「问题诊断与性能调优」方法论,助你稳步进阶、放大技术价值。

**My Coding Family** 1856

人工智能算法面试大总结-总目录

涉及秋招、春招、社招

啥都生的博客 2万+

UICollectionViewController 集合视图控制器

UICollectionViewController 类似于 UITableViewController 是UICollectionView 与 控制器类的整合封装.其作用也就主要体现在UICollocationView UICollectionViewController 基本属性

rare_ice的博客 1449

RISC-V CPU设计(三)---多周期CPU的设计与实现

基本情况 本多周期CPU支持RV32I指令集(fence,ecall,ebreak除外),已通过部分指令的测试,如代码有bug,欢迎指出。 模块划分 代码将CPU划分为以下几个模块: 1.控制单元:ControlUnit 用于产生控制信号,是CPU的大脑,指挥中枢。 2.分支决策单元:BranchUnit 用于决定B型指令是否发生跳转 3.立即数单元:ImmUnit 用于从指令中解析出立即数. 4.寄存器堆:RegisterFile RISC-V的32个寄存器,其中x0寄存器恒为0,不可更改。 5.指令存储

qq_40268672的博客 5550

iOS 开发UICollectionView及其常用方法+实例

本章通过先总体介绍UICollectionView及其常用方法,再结合一个实例,了解如何使用UICollectionView。   UICollectionView 和 UICollectionViewController 类是iOS6 新引进的API,用于展示集合视图,布局更加灵活,可实现多列布局,用法类似于UITableView 和 UITableViewController 类。

z997756128的专栏 734

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

深度学习工具包 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');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

开源自研AI动画生成系统:部署、接口与批量渲染详解

随着生成式AI技术快速演进,将文本、图像与动作序列整合为完整动画生产链路的需求日益增长。开源动画生成系统通过模块化设计,将模型调度、角色一致性控制、批量渲染及API服务封装为可复用的工程方案,大幅降低了动画预演与短视频批量生产的门槛。这类系统通常支持WebUI、命令行与接口服务三种交互方式,并可在本地GPU环境下部署运行。在工程实践中,合理规划显存、设计任务队列并做好输入素材合规审核,是保障稳定产出的关键。本文围绕一套开源自研全能AI动画生成系统,梳理其核心能力、部署流程、接口调用与性能优化策略,为本地化动

weixin_34221773的博客 302

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

iOS开发 纯代码创建UICollectionView

转:http://jingyan.baidu.com/article/eb9f7b6d8a81a5869364e8a6.html iOS开发 纯代码创建UICollectionView  习惯了使用xib和StoryBoard创建UICollectionView项目工程的伙伴,需要转换使用纯代码来实现,想避免碰更多的壁,就需要认真了解创建UICollectionView过程了。...

weixin_34362790的博客 175

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

[转载]iOS6新特征:UICollectionView官方使用示例代码研究

原文地址:iOS6新特征:UICollectionView官方使用示例代码研究作者:浪友dans 注:这里是iOS6新特征汇总贴链接 iOS6新特征:参考资料和示例汇总   这个链接可以学习到UICollectionView的相关介绍:iOS6新特征:UICollectionView介绍  由于UICollectionView功能比较强大,在此,我们深入学习一下UIColle

lin的iOS专栏 564

iOS开发 纯代码创建UICollectionView 听语音

iOS开发 纯代码创建UICollectionView听语音1234567分步阅读一键约师傅百度师傅高质屏和好师傅,解救你的碎屏机 习惯了使用xib和StoryBoard创建UICollectionView项目工程的伙伴,需要转换使用纯代码来实现,想避免碰更多的壁,就需要认真 了解创建UICollectionView过程了。创建UICollectionView比...

weixin_33896069的博客 125

iOS UICollectionView高级用法(长按自由移动cell)-新

【reference】http://www.jianshu.com/p/31d07bf32d62 iOS 9之后: 示例如下 效果 前言: 看完你可以学到哪些呢? 就是文章标题那么多, 只有那么多. . 手残效果图没弄好. @property (nonatomic, strong) UICollectionView *xtCollectionView; @prope...

weixin_33943836的博客 279

iOS:UICollectionView使用

说明: UICollectionView类似UITableVIew,可实现横向或纵向排列,还可实现每行Item使用不同的布局,类试于android中的RecyclerView。 横向排列:选中UICollectionView -> 右侧属性面板Scroll Direction -> Vertical 纵向排列:选中UICollectionView -> 右侧属性面板Scro...

a526001650a的专栏 919

iOS开发之瀑布流的实现(UICollectionView与UIScrollView)

瀑布流可以在保证图片原始bi

演完领便当的专栏 1650

iOS6新特征:UICollectionView介绍

iOS6新特征:UICollectionView介绍 分类:ios2012-11-01 07:5154321人阅读评论(8)收藏举报 目录(?)[+] 1.1. Collection View 全家福: UICollectionView, UITableView, NSCollecti...

weixin_30367169的博客 72

iOS6新特征:UICollectionVi…

原文地址:iOS6新特征:UICollectionView官方使用示例代码研究作者:浪友dans注:这里是iOS6新特征汇总贴链接 iOS6新特征:参考资料和示例汇总   这个链接可以学习到UICollectionView的相关介绍:iOS6新特征:UICollectionView介绍  由于UICollectionView功能比较强大,在此,我们深入学习一下UICollectionView的官

yezibao晨木木的iOS专栏 965

UICollectionView

UICollectionView简介 UICollectionView是一种应用广泛的数据展示方式,是iOS6.0以后引进的。在各大app都有广泛的引用。   QQ音乐热搜   下厨房集市页   花瓣的发现 UICollectionView主要包括了下面几部分: UICollectionView-内容显示的主视图,类似于UITableView。 UICollec...

weixin_33909059的博客 86

UICollectionView和UITableView常见错误总结

UITableView和UICollectionView是在IOS开发过程中使用得比较多的数据展示控件。这两个控件各有千秋,有各自的最适应场合。UICollectionView在使用的时候比UITableView更严格,特别是侧重于UICollectionViewCell的重用,在创建诸多对象的时候,一定要使用重用机制,否则就会报相应 的错误,下面就对这些常见错误做一个总结: 1.reaso

YCM1101743158的博客 2442

iOS无限轮播器框架(UICollectionView实现,添加了UIPageControl)

一、控制器里只需要写下边的代码#import "ViewController.h" #import "JWCycleCollectionView.h" #import "JWPageControl.h" @interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super view

Haikuotiankong11111的博客 2669
上一篇: 软件工程师的鄙视链
下一篇: 转载一篇优秀博文 UICollectionView基础
LG_刚刚好
博客等级 码龄11年 14粉丝 91原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址