iOS入门(二十八)事件处理

声纹识别实战:用Python从零搭建一个简易声纹验证系统(附完整代码) 本文是一份详细的声纹识别实战指南,教你使用Python从零搭建一个简易的声纹验证系统。文章涵盖了从音频采集、预处理、MFCC特征提取,到基于高斯混合模型(GMM)的建模与验证全流程,并提供了完整的代码实现,帮助开发者快速掌握这项生物特征识别核心技术。 阅读详情
 事件处理     绘图 
UIResponder : UIView   UIViewController  UIApplication
事件响应顺序
1、设备
2、当前app 
3、delegate
4、UIWindow
5、VIewController
6、view
7、subview
UIImageView  UILabel 默认不响应任何事件。

NSValue  : 将结构体转换成对象

    CGContextRef context = UIGraphicsGetCurrentContext();

    CGContextSetStrokeColorWithColor(context, [UIColor cyanColor].CGColor);

    CGContextSetLineWidth(context, 5);

    for (int i = 0 ;  i < [_lineArray count] ; i ++ ) {

        //取出一条线(点得数组)

        NSMutableArray * pointArr = [_lineArray objectAtIndex:i];

        if ([pointArr count] > 0 ) {

            for (int j = 0 ;  j < [pointArr count] -1;  j ++ ) {

                NSValue * a = [pointArr objectAtIndex:j ];

                CGPoint pointA = [a CGPointValue];

                NSValue * b = [pointArr objectAtIndex:j + 1];

                CGPoint pointB = [b CGPointValue];

                CGContextMoveToPoint(context, pointA.x, pointA.y);

                CGContextAddLineToPoint(context, pointB.x, pointB.y);

            }

        }

    }

    CGContextStrokePath(context);

}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

    //每次点击屏幕的时候,创建一条线的数组

    NSMutableArray * points = [NSMutableArray array];

    //把创建好的线添加到线的数组里面

    [self.lineArray addObject:points];

}

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

{

    //获得最新的线

    NSMutableArray * pointArr = [self.lineArray lastObject];

    //获得当前经过的点

    //获得UITouch

    UITouch * touch = [touches anyObject];

    //获得touch中存储的点

    CGPoint point =  [touch locationInView:self];

    //把CGPoint 转换成对象(NSValue)

    NSValue * value= [NSValue valueWithCGPoint:point];

    //将接触获得的点添加到当前正在绘制的线中

    [pointArr addObject:value];

    //强制UIView调用drawRect方法

    [self setNeedsDisplay];

}


 

    //context包含UIView需要的各种信息

//    CGContextRef context = UIGraphicsGetCurrentContext();

//    //1、设置线的颜色

//    CGContextSetStrokeColorWithColor(context, [UIColor cyanColor].CGColor);

//    //2、设置线的粗细

//    CGContextSetLineWidth(context, 6);

//    //3、设置线段的起点

//    CGContextMoveToPoint(context, 20, 20);

//    //4、设置线段的终点

////    CGContextAddLineToPoint(context, 220, 220);

//

//    //绘制椭圆

////    CGContextAddEllipseInRect(context, CGRectMake(20, 20, 200, 200));

//    //绘制方形

////    CGContextAddRect(context, CGRectMake(20, 20, 200, 200));

//    //绘制曲线  参数: context 曲线参考点坐标,结束点坐标 ( 起点为之前停止的地方)

//    CGContextAddQuadCurveToPoint(context, 0, 200, 320, 220);

//

//    //5、绘制设置好的线

//    CGContextStrokePath(context);

 




 

    //    CGContextSetStrokeColorWithColor(context, [UIColor yellowColor].CGColor);

    //    CGContextSetLineWidth(context, 5.2f);

    //

    //    UIColor * aColor2 = [UIColor cyanColor];//天蓝色

    //    CGContextSetFillColorWithColor(context, aColor2.CGColor);//填充颜色

    //    CGContextAddArc(context, 150, 50, 30, 50, 60, 0);//填充圆

    //    CGContextFillPath(context);

    //

    //    CGContextAddArc(context, 40, 280, 30, 50, 60, 0);//空心圆

    //    CGContextStrokePath(context);

    //

    //

    //    UIColor * aColor = [UIColor cyanColor];//天蓝色

    //    CGContextSetFillColorWithColor(context, aColor.CGColor);//填充颜色

    //    CGContextFillRect(context,CGRectMake(10, 180, 150, 50));//填充框

    //

    //    CGContextStrokeRect(context,CGRectMake(10, 120, 150, 50));//空心框

    //

    //

    //    UIColor * aColor1 = [UIColor grayColor];//灰色

    //    CGContextSetFillColorWithColor(context, aColor1.CGColor);//填充颜色

    //    CGContextAddEllipseInRect(context, CGRectMake(90, 280, 60, 30)); //椭圆

    //    CGContextDrawPath(context, kCGPathFillStroke);

    //

    //

    //    //画三角形

    //    CGPoint sPoints[3];//坐标点

    //    sPoints[0] =CGPointMake(165, 285);//坐标1

    //    sPoints[1] =CGPointMake(195, 285);//坐标2

    //    sPoints[2] =CGPointMake(195, 225);//坐标3

    //    CGContextAddLines(context, sPoints, 3);//添加线

    //    CGContextClosePath(context);//封起来

    //    CGContextDrawPath(context, kCGPathFillStroke); //根据坐标绘制路径

    //    CGContextStrokePath(context);//开始绘制

 




 

//上午练习

//-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

//{

//    [self setBackgroundColor:[UIColor yellowColor]];

//    NSLog(@"%@",touches);

//    UITouch * touch = [touches anyObject];

//    NSLog(@"%d",touch.tapCount);

//}

//-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

//{

//    [self setBackgroundColor:[UIColor cyanColor]];

//}

//-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

//{

//    [self setBackgroundColor:[UIColor blueColor]];

//}

//-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event

//{

//    [self setBackgroundColor:[UIColor greenColor]];

//    NSLog(@"lallalalalala");

//}

//-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event

//{

//    [self setBackgroundColor:[UIColor purpleColor]];

//}



 

    [self setBackgroundColor:[UIColor yellowColor]];

    NSLog(@"%@",touches);

    UITouch * touch = [touches anyObject];

    NSLog(@"%d",touch.tapCount);


汽车行业新能源汽车数据爬虫:抓取新能源汽车数据,分析市场发展和技术创新 在汽车行业,新能源汽车市场的发展和技术创新是当前的热点话题。通过抓取新能源汽车的数据,我们可以深入了解市场趋势、消费者需求以及技术创新的方向。本文将详细介绍如何使用 Python 爬虫技术抓取新能源汽车数据,并对数据进行分析和可视化展示。 阅读详情

相关推荐

Ubuntu 24.04下Loki+Alloy+Grafana日志分析系统的快速部署与实践

本文详细介绍了在Ubuntu 24.04系统上快速部署Loki+Alloy+Grafana轻量级日志分析系统的完整流程。通过二进制安装Loki、配置Alloy采集器以及设置Grafana可视化界面,构建了一套资源消耗低、易于管理的日志解决方案,并实战演示了如何采集和分析网络设备日志,特别适合资源有限的中小团队或边缘计算场景。

tensor9flow的博客 236

iOS 底层探索(二十八) RunLoop

iOS 底层探索(二十八) RunLoop RunLoop概述 RunLoop的定义 RunLoop说白了就是一个do...While循环 RunLoop的作用 保持程序的持续运行 处理App中的各种事件(触摸、定时器、performSelector) 节省CPU资源、提供程序的性能:该做事就做事,该休息就休息j RunLoop的经典图 RunLoop的item block应用:CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK 调用timer:CFRUNLOOP_IS_CALL

HumorousGhost 621

要配置西门子G120XA变频器实现**端子启停**和**Modbus RTU(485)频率给定

如有问题,可通过STARTER软件在线诊断Modbus通讯状态。要配置西门子G120AX变频器实现。

微:13763355074 4851

收藏的文章

记录一些文章:

流火緋瞳的博客 797

用Python的fengwo模块复刻通达信筹码峰(COST/WINNER),选股效率提升10倍

本文介绍了如何使用Python的fengwo模块高效复刻通达信的筹码峰(COST/WINNER)计算,显著提升选股效率。通过C++内核与多线程优化,fengwo模块将传统Python实现的数小时计算压缩至分钟级,解决了量化交易中的性能瓶颈问题。文章详细解析了筹码峰计算原理、fengwo模块的技术架构及实战应用,助力量化开发者构建高效选股系统。

weixin_29062823的博客 438

简单的服务器取证

记一次入门服务器取证——药品直销网,涵盖旧版本宝塔、静态IP的配置更改、代码的理解

m0_74559567的博客 3756

React 和 ReactNative 第五版(一)

几年来,React和在 JavaScript 开发者中已被证明是全面且实用的 React 生态系统指南的热门选择。第五版包含了 React 的最新功能、增强和修复,同时与 React Native 兼容。它包括新的章节,涵盖了使用 React 和TypeScript进行现代跨平台应用开发的关键特性和概念。从 React 的基础知识到流行的特性,如Hooks、服务器端渲染和单元测试,这本权威指南将按步骤帮助你成为一名专业的 React 开发者。你将从学习 React 组件的基本构建块开始。

龙哥盟 1020

代谢组数据分析(二十):通过WGCNA识别核心代谢物

本教程详细介绍了一种系统性的分析流程,旨在从复杂的代谢物数据中识别出关键的代谢物。这一流程首先通过精心设计的代谢物选择步骤,从大量候选代谢物中筛选出具有潜在生物学意义的子集。随后,利用WGCNA方法,对这些筛选后的代谢物进行深入分析,以构建它们的共表达网络,最终筛选出与研究目的相关的核心代谢物(hub metabolites)。

专注生信领域 3775

JAVA程序员面试32问

第一,谈谈final, finally, finalize的区别。  第二,Anonymous Inner Class (匿名内部类) 是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)?  第三,Static Nested Class 和 Inner Class的不同,说得越多越好(面试题有的很笼统)。  第四,&和&&的区别。 

苦咖啡的自留地 586

C++性能优化:深入理解缓存一致性与伪共享

在现代多核处理器的世界里,理解缓存一致性和伪共享就像理解一个复杂社会系统的运作规则。正如心理学家阿德勒所说:"人的行为总是有目的的",CPU缓存的每一次同步也都有其深层的硬件逻辑。本文将带你深入探索这些看不见的性能杀手,以及如何在实际项目中与它们优雅共处。

探索C++编程的奥秘,分享深入的技术见解和实践,旨在激发读者创造力与解决问题的思维。 936

NVIDIA Isaac GR00T N1.5 人形机器人强化学习入门教程(四)Lerobot、宇树 G1 等不同形态机器人微调教程

本笔记本是一份关于如何在新的数据集上对GR00T-N1预训练模型进行微调的教程。

2506_90492529的博客 1667

HarmonyOS 6.1 实战:将预置的静态数据数组通过 .slice() 浅拷贝后赋值给组件的 @State 变量

引言在移动端应用开发领域,HarmonyOS 6.1.1 的发布为开发者带来了全新的声明式 UI 编程范式,其中 ArkTS 语言作为 TypeScript 的超集,不仅继承了强类型系统的全部优势,还在此基础上深度整合了 HarmonyOS ArkTS API 24 的响应式状态管理能力。本文将以一个城市观星社区应用为典型案例,完整剖析一个具有小红书风格内容社区的架构设计思路、状态管理模型、组件化拆分策略以及深色星空主题的实现细节。这个应用涵盖了观星日志记录、天象日历展示、星空摄影分享、望远镜装备管理、观星

2501_92985290的博客 768

深度学习工具包 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")

iOS入门(十八)OC中常用的几种传值方式

1、属性传值。属性传值是所有传值方式中最简单的一种方法,所有是实现的传值也是最简单的相邻两个视图之间的被设置为属性的变量之间的值传递。只需在推出下一个页面之前,将下一个页面中接受属性传值的属性在本页面中进行值得设置即可。  2、单例传值。单例传值是一种比较强大的传值方式,他可以再任意两个页面之间进行一些简单的值传递。所谓的单例传值就是在程序实现中新建一个类,将想要传递的值存储到这样的一个类中

SpinningTopSlowly的博客 2019

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

iOS入门(六)二维数组

二维数组 类型说明符[常量表达式1(可省略)][常量表达式2] = { }; 字符串数组 eg : char strings[3][10] = { "iPhone" , "Android" , "win8" } ;      //    二维数组      //    int array[3][4] = { 0 }; //    int n = 1; //    for (int

SpinningTopSlowly的博客 843

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

iOS入门(十二)动态内存分配

栈      由编译器自动分配和释放,在函数体中定义的变量通常在栈上,先进后出,   从高向低分配。  堆      一般由程序员分配和释放  从低向高分配。一些分配内存的函数。 全局区(静态区) 初始化的全局变量和静态变量在一块区域,未初始化的全局变量和静态变量在相邻的另外一块区域。 常量区  程序代码区      函数被调用时会从代码区取出,需要的参数以及函数体中的变量,会在栈中

SpinningTopSlowly的博客 750

iOS入门(十一)结构体指针

结构体指针    指向结构体变量的指针   存放结构体变量第一个成员的地址。 (*p) . sex =           p->sex =       指针可以作为函数参数   一般指针,数组,结构体指针     作为函数参数 传值与传址  // 结构体指针 //    Mycar car1 = { "奥迪" , 888 , 'b'}; //    Mycar car2 = {

SpinningTopSlowly的博客 670

iOS入门(三十九) MVC

MVC  模型,控制,视图  M C       KVO  通知中心 (Notification) C  V      TARGET   DELEGATE   DATASOURCE   OutLet  KVO    KeyValueObserving  KVC    keyValueCoding 键值编码  一种可以通过key值来间接访问属性的机制,基于观察者模式. 存在于协议(NSK

SpinningTopSlowly的博客 655

iOS入门(十五)类和对象

类和对象 类和对象是面向对象的核心  定义类,创建对象,使用对象。 类 : 具有相同特征和行为的事物的抽象。  定义类包括两个部分,接口部分和实现部分 @ oc对c语言的扩展。 @interface person:NSObject 创建对象  :分配内存空间   Person *P = 【Person alloc 】; 初始化     : p = 【p init 】; P

SpinningTopSlowly的博客 643

iOS入门(二十五)基础控件

基础控件 UILable           文本显示      UILabel * view1 = [[UILabel alloc]initWithFrame:CGRectMake(20, 50, 40, 120)];     view1.backgroundColor = [UIColor clearColor]; //背景色     view1.text = @"i lo

SpinningTopSlowly的博客 591

iOS入门(十四)函数指针

函数指针 函数名代表函数的内存地址(入口地址) 函数指针定义  :(指针名可以代表函数名) //    int (*p ) ( int , int) = maxValue;       or     int (*p) ( int ,int)= NULL;     p = maxValue; 重命名:  typedef int  (*PFUN) (int ,int ) ;   

SpinningTopSlowly的博客 577

iOS入门(二十)字典

字典 用于保存具有映射关系的数据(key —— value对) 字典是存储key——value对的容器。 字典考key存取数据 不可变字典 : NSNictionary。 NSMutableDictionary  可变字典 集合 NSSet 可变集合 NSMutableSet  快速遍历 数组排序  //    NSDictionary * dic = [[

SpinningTopSlowly的博客 575

iOS入门(七)函数

库函数,用户自定义函数 有返回值函数,无返回值函数 有参数函数, 无参数函数。 函数定义 : 类型标示符  函数名 ( 参数列表) { 代码 }                   ( 返回值类型)  有返回值无参数函数定义     int taxi () {         return 8;     }                   在主函数中 :    int

SpinningTopSlowly的博客 530

iOS入门(三十七) 中级数据持久化

中级数据持久化  sqlite3  /FMDB/CoreData 开源库 数据插入命令:insert 数据更新命令:update 数据删除命令:delete 数据检索命令:select 创建一个继承于NSObject的单例管理数据库 create table tablename(name name type  ,age int ,number int primary

SpinningTopSlowly的博客 518

iOS入门(三十六) 初级数据持久化

初级数据持久化   什么是沙盒机制 给一个空间,自由支配  preferences 偏好设置 BSBundle  .4 两种产生UIImage的途径 UIImage * image = [UIImage imageWithContentsOfFile:imagePath]; 1、稳定 2、 直接从文件读取(文件-内存)单向,只有一次(背景图片) 使用UIImage  ima

SpinningTopSlowly的博客 517

iOS入门(三十)UICOntrol 及其子类

UICOntrol 及其子类  UISegmentedControl initWithItems  独有初始化方法,用于创建多个分段 通常点击不同的segment来切换不同的view 颜色和图片不能共存  图片要求: 44*44      背景是透明色 UISlider UISwitch UIStepper UIImageView UIControl是所有控制控件的基类

SpinningTopSlowly的博客 514

iOS入门(二十二)属性

属性的声明 : @property 属性的实现 : @synthesize  属性的属性 :  读写性控制 readwrite    readonly   setter    getter 默认为readwrite  原子性 :  atomic nonatomic     默认原子性(保证安全) 但是通常改成非原子性。     @property ( nonatomic , r

SpinningTopSlowly的博客 512
上一篇: iOS入门(二十七)视图控制器UIViewController
下一篇: iOS入门(二十九)Target Action 和手势
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值