斯坦福大学iOS应用开发教程学习笔记(第五课)Protocols,手势识别

优化——UIScrollView通过内容延迟加载以达到平滑滑动。 前面写了一篇《UIScrollView 平滑划动处理》,是通过延迟操作来达到平滑移动,但操作起来比较生涩,而且逻辑较复杂,现在已经弃之不用。 前文已经提到,将所有的内容页全部加入到ScrollView是最简单的方法,而且能够非常平滑划动,但如果是大数据量的时候,明显是不适用的。最近参考了Three20的TTScrollView以及TTPhotoViewController后,终于找到了一种内容页 阅读详情

第五课内容: 自动旋转、 Protocols、 手势识别、一个自定义UIView的Demo

1、自动旋转

当设备旋转时,你的controller会做什么呢?你可以控制界面是否和设备一起一起旋转。
[cpp]  view plain copy
  1. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation  
  2. {  
  3. return UIInterfaceOrientationIsPortrait(orientation); // only support portrait   
  4. return YES; // support all orientations  
  5. return (orientation != UIInterfaceOrientationPortraitUpsideDown); // anything but  
  6. }  
当旋转的时候,view的bounds会改变,子view的frame,子view的子view也会改变。
改变的规则是:struts和springs。
当view的bound改变时,drawRect不会默认调用


红色的 I 就是struts,中间的红色箭头就是springs。
右边红白色的显示屏似的就是用动画告诉你view如何改变。白色的是父view,红色的是你选中的view。
这个控制在iPhone上一般使用不到,因为屏幕太小了。
幸运的是,有UIView有这么个属性来控制

三种控制方式:

1、
[cpp]  view plain copy
  1. @property (nonatomic) UIViewContentMode contentMode;  
[cpp]  view plain copy
  1. UIViewContentMode{Left,Right,Top,Right,BottomLeft,BottomRight,TopLeft,TopRight}  
2、缩放的控制属性:
[cpp]  view plain copy
  1. UIViewContentModeScale{ToFill,AspectFill,AspectFit} // bit stretching/shrinking  
分别是填充,内容填充,内容适应。 toFill是默认的模式,它会自动缩放像素点填满新的空间,可能会造成图形扭曲。
3、
[cpp]  view plain copy
  1. @property (nonatomic) CGRect contentStretch;  
指定某一个区域拉伸
初始化一个UIView.

2、协议procotol

[cpp]  view plain copy
  1. @protocol Foo <Other, NSObject> // implementors must implement Other and NSObject too  
  2. - (void)doSomething; // implementors must implement this (methods are @required by default)   
  3. @optional  
  4. - (int)getSomething; // implementors do not have to implement this  
  5. - (void)doSomethingOptionalWithArgument:(NSString *)argument; // also optional  
  6. @required  
  7. - (NSArray *)getManySomethings:(int)howMany; // back to being “must implement”   
  8. @property (nonatomic, strong) NSString *fooProp; // note that you must specify strength  
  9. @end  

可以定义在自己的头文件里,也可以定义在其他类的头文件中。
实现协议,并使用的语法:
[cpp]  view plain copy
  1. #import “Foo.h” // importing the header file that declares the Foo @protocol   
  2. @interface MyClass : NSObject <Foo> // MyClass is saying it implements the Foo @protocol  
  3. ...  
  4. @en  
[cpp]  view plain copy
  1. id <Foo> obj = [[MyClass alloc] init];  
[cpp]  view plain copy
  1. @property (nonatomic, weak) id <Foo> myFooProperty; // properties too!  
协议的主要作用:
实现委托和数据源。
委托几乎都是weak的,因为被设置为委托的对象通常都是委托对象的所有者或创建者。
比如controller通常把自己设置成view的委托或数据源,你不要它们相互的strong指针指向。
scrollView例子
[cpp]  view plain copy
  1.   
[cpp]  view plain copy
  1. @protocol UIScrollViewDelegate  
  2. @optional  
  3. - (UIView *)viewForZoomingInScrollView:(UIScrollView *)sender;  
  4. - (void)scrollViewDidEndDragging:(UIScrollView *)sender willDecelerate:(BOOL)decelerate;  
  5. @end  
  6. @interface UIScrollView : UIView  
  7. @property (nonatomic, weak) id <UIScrollViewDelegate> delegate;  
  8. @end  
  9. @interface MyViewController : UIViewController <UIScrollViewDelegate>  
  10. @property (nonatomic, weak) IBOutlet UIScrollView *scrollView;  
  11. @end  
  12. @implementation MyViewController  
  13. - (void)setScrollView:(UIScrollView *)scrollView {  
  14.     _scrollView = scrollView;  
  15. self.scrollView.delegate = self; // compiler won’t complain   
  16. }  
  17. - (UIView *)viewForZoomingInScrollView:(UIScrollView *)sender { return ... };   
  18. @end  

3、手势识别

[cpp]  view plain copy
  1.   

如何获得触摸事件呢?

得到触摸时间的通知
相应预定义好的手势
UIGestureRecognizer类,它是个抽象类,需要实现。

使用手势识别有两步骤:

先创建一个手势,把它附到UIView上,然后当手势被识别时进行处理。
第一步由controller来完成
第二步由UIView自己完成
从controller添加一个手势到UIView:
[cpp]  view plain copy
  1. - (void)setPannableView:(UIView *)pannableView  
  2.       {  
  3.           _pannableView = pannableView;  
  4.           UIPanGestureRecognizer *pangr =  
  5.               [[UIPanGestureRecognizer alloc] initWithTarget:pannableView action:@selector(pan:)];  
  6.           [pannableView addGestureRecognizer:pangr];  
  7. }  
target 是手势识别之后的处理者,这里就是view本身。

UIPangestureRecognizer的三个方法:

[cpp]  view plain copy
  1. - (CGPoint)translationInView:(UIView *)aView;  
  2. - (CGPoint)velocityInView:(UIView *)aView;  
  3. - (void)setTranslation:(CGPoint)translation inView:(UIView *)aView;  
第一个告诉移动的距离
第二个告诉移动的速度
第三个是重新设置

手势识别的状态机

[cpp]  view plain copy
  1. @property (readonly) UIGestureRecognizerState state;  
状态从possible  如果手势比较短:recognized    如果持续:Began - Changed  ,最后Ended
还有Failed 和 Cancelled状态,取消或其他操作中断时会有这个情况。

pan:是什么样的呢:
[cpp]  view plain copy
  1. - (void)pan:(UIPanGestureRecognizer *)recognizer  
  2. {  
  3. if ((recognizer.state == UIGestureRecognizerStateChanged) ||  
  4. (recognizer.state == UIGestureRecognizerStateEnded)) {  
  5.    CGPoint translation = [recognizer translationInView:self];  
  6.    // move something in myself (I’m a UIView) by translation.x and translation.y  
  7.    // for example, if I were a graph and my origin was set by an @property called origin   
  8.   self.origin = CGPointMake(self.origin.x+translation.x, self.origin.y+translation.y);   
  9.   [recognizer setTranslation:CGPointZero inView:self];  
  10.   }   
  11. }  

其他实例的手势:

UIPinchGestureRecognizer 缩放
UIRotationGestureRecognizer 旋转手势,两个手指按下,然后旋转,是个弧度,不是角度。
UISwipeGestureRecognizer    滑动手势, 一个或多个手指滑动,
UITapGestureRecognizer  点击手势

4、一个幸福笑脸的Demo:

内容介绍:

Model是: int happiness
View是:自定义的view叫做FaceView
Controller是:HappinessViewController
观察内容有:
drawRect 包括绘制子程序, pop push context(环境)
Faceview委托的数据如何属于Controller的协议。
Controller处理手势,或者view处理手势
通过手势来改变幸福度。

用整数表示幸福度, 0表示悲伤, 100表示非常幸福。

有两个手势,一个被view处理,因为它只修改显示,另外一个被controller处理,它要修改model,修改幸福度。

主要源码:
happinessViewController.h
[cpp]  view plain copy
  1. #import <UIKit/UIKit.h>  
  2.   
  3. @interface HappinessViewController : UIViewController  
  4.   
  5. @property (nonatomic) int happiness;  // 0 is sad; 100 is very happy  
  6.   
  7. @end  
happinessViewController.m
[cpp]  view plain copy
  1. #import "HappinessViewController.h"  
  2. #import "FaceView.h"  
  3.   
  4. @interface HappinessViewController() <FaceViewDataSource>  
  5. @property (nonatomic, weak) IBOutlet FaceView *faceView;  
  6. @end  
  7.   
  8. @implementation HappinessViewController  
  9.   
  10. @synthesize happiness = _happiness;  
  11. @synthesize faceView = _faceView;  
  12.   
  13. - (void)setHappiness:(int)happiness  
  14. {  
  15.     _happiness = happiness;  
  16.     [self.faceView setNeedsDisplay]; // any time our Model changes, redraw our View  
  17. }  
  18.   
  19. - (void)setFaceView:(FaceView *)faceView  
  20. {  
  21.     _faceView = faceView;  
  22.     // enable pinch gestures in the FaceView using its pinch: handler  
  23.     [self.faceView addGestureRecognizer:[[UIPinchGestureRecognizer alloc] initWithTarget:self.faceView action:@selector(pinch:)]];  
  24.     [self.faceView addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleHappinessGesture:)]];  // gesture to modify our Model  
  25.     self.faceView.dataSource = self;  
  26. }  
  27.   
  28. - (void)handleHappinessGesture:(UIPanGestureRecognizer *)gesture  
  29. {  
  30.     if ((gesture.state == UIGestureRecognizerStateChanged) ||  
  31.         (gesture.state == UIGestureRecognizerStateEnded)) {  
  32.         CGPoint translation = [gesture translationInView:self.faceView];  
  33.         self.happiness -= translation.y / 2;  
  34.         [gesture setTranslation:CGPointZero inView:self.faceView];  
  35.     }  
  36. }  
  37.   
  38. - (float)smileForFaceView:(FaceView *)sender  
  39. {  
  40.     return (self.happiness - 50) / 50.0; // translate Model for View  
  41. }  
  42.   
  43. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation  
  44. {  
  45.     return YES; // support all orientations  
  46. }  
  47.   
  48. @end  

FaceView.h
[cpp]  view plain copy
  1. #import <UIKit/UIKit.h>  
  2.   
  3. @class FaceView;  // forward declaration for use in @protocol  
  4.   
  5. @protocol FaceViewDataSource  
  6. - (float)smileForFaceView:(FaceView *)sender;  
  7. @end  
  8.   
  9. @interface FaceView : UIView  
  10.   
  11. @property (nonatomic) CGFloat scale;  
  12.   
  13. - (void)pinch:(UIPinchGestureRecognizer *)gesture;  // resizes the face  
  14.   
  15. // set this property to whatever object will provide this View's data  
  16. // usually a Controller using a FaceView in its View  
  17. @property (nonatomic, weak) IBOutlet id <FaceViewDataSource> dataSource;  
  18.   
  19. @end  
FaceView.m
[cpp]  view plain copy
  1. #import "FaceView.h"  
  2.   
  3. @implementation FaceView  
  4.   
  5. @synthesize dataSource = _dataSource;  
  6. @synthesize scale = _scale;  
  7.   
  8. #define DEFAULT_SCALE 0.90  
  9.   
  10. - (CGFloat)scale  
  11. {  
  12.     if (!_scale) {  
  13.         return DEFAULT_SCALE; // don't allow zero scale  
  14.     } else {  
  15.         return _scale;  
  16.     }  
  17. }  
  18.   
  19. - (void)setScale:(CGFloat)scale  
  20. {  
  21.     if (scale != _scale) {  
  22.         _scale = scale;  
  23.         [self setNeedsDisplay]; // any time our scale changes, call for redraw  
  24.     }  
  25. }  
  26.   
  27. - (void)pinch:(UIPinchGestureRecognizer *)gesture  
  28. {  
  29.     if ((gesture.state == UIGestureRecognizerStateChanged) ||  
  30.         (gesture.state == UIGestureRecognizerStateEnded)) {  
  31.         self.scale *= gesture.scale; // adjust our scale  
  32.         gesture.scale = 1;           // reset gestures scale to 1 (so future changes are incremental, not cumulative)  
  33.     }  
  34. }  
  35.   
  36. - (void)setup  
  37. {  
  38.     self.contentMode = UIViewContentModeRedraw; // if our bounds changes, redraw ourselves  
  39. }  
  40.   
  41. - (void)awakeFromNib  
  42. {  
  43.     [self setup]; // get initialized when we come out of a storyboard  
  44. }  
  45.   
  46. - (id)initWithFrame:(CGRect)frame  
  47. {  
  48.     self = [super initWithFrame:frame];  
  49.     if (self) {  
  50.         [self setup]; // get initialized if someone uses alloc/initWithFrame: to create us  
  51.     }  
  52.     return self;  
  53. }  
  54.   
  55. - (void)drawCircleAtPoint:(CGPoint)p withRadius:(CGFloat)radius inContext:(CGContextRef)context  
  56. {  
  57.     UIGraphicsPushContext(context);  
  58.     CGContextBeginPath(context);  
  59.     CGContextAddArc(context, p.x, p.y, radius, 0, 2*M_PI, YES); // 360 degree (0 to 2pi) arc  
  60.     CGContextStrokePath(context);  
  61.     UIGraphicsPopContext();  
  62. }  
  63.   
  64. - (void)drawRect:(CGRect)rect  
  65. {  
  66.     CGContextRef context = UIGraphicsGetCurrentContext();  
  67.       
  68.     CGPoint midPoint; // center of our bounds in our coordinate system  
  69.     midPoint.x = self.bounds.origin.x + self.bounds.size.width/2;  
  70.     midPoint.y = self.bounds.origin.y + self.bounds.size.height/2;  
  71.       
  72.     CGFloat size = self.bounds.size.width / 2;  
  73.     if (self.bounds.size.height < self.bounds.size.width) size = self.bounds.size.height / 2;  
  74.     size *= self.scale; // scale is percentage of full view size  
  75.       
  76.     CGContextSetLineWidth(context, 5.0);  
  77.     [[UIColor blueColor] setStroke];  
  78.       
  79.     [self drawCircleAtPoint:midPoint withRadius:size inContext:context]; // head  
  80.       
  81. #define EYE_H 0.35  
  82. #define EYE_V 0.35  
  83. #define EYE_RADIUS 0.10  
  84.       
  85.     CGPoint eyePoint;  
  86.     eyePoint.x = midPoint.x - size * EYE_H;  
  87.     eyePoint.y = midPoint.y - size * EYE_V;  
  88.       
  89.     [self drawCircleAtPoint:eyePoint withRadius:size * EYE_RADIUS inContext:context]; // left eye  
  90.     eyePoint.x += size * EYE_H * 2;  
  91.     [self drawCircleAtPoint:eyePoint withRadius:size * EYE_RADIUS inContext:context]; // right eye  
  92.   
  93. #define MOUTH_H 0.45  
  94. #define MOUTH_V 0.40  
  95. #define MOUTH_SMILE 0.25  
  96.       
  97.     CGPoint mouthStart;  
  98.     mouthStart.x = midPoint.x - MOUTH_H * size;  
  99.     mouthStart.y = midPoint.y + MOUTH_V * size;  
  100.     CGPoint mouthEnd = mouthStart;  
  101.     mouthEnd.x += MOUTH_H * size * 2;  
  102.     CGPoint mouthCP1 = mouthStart;  
  103.     mouthCP1.x += MOUTH_H * size * 2/3;  
  104.     CGPoint mouthCP2 = mouthEnd;  
  105.     mouthCP2.x -= MOUTH_H * size * 2/3;  
  106.       
  107.     float smile = [self.dataSource smileForFaceView:self];  
  108.     if (smile < -1) smile = -1;  
  109.     if (smile > 1) smile = 1;  
  110.       
  111.     CGFloat smileOffset = MOUTH_SMILE * size * smile;  
  112.     mouthCP1.y += smileOffset;  
  113.     mouthCP2.y += smileOffset;  
  114.       
  115.     CGContextBeginPath(context);  
  116.     CGContextMoveToPoint(context, mouthStart.x, mouthStart.y);  
  117.     CGContextAddCurveToPoint(context, mouthCP1.x, mouthCP2.y, mouthCP2.x, mouthCP2.y, mouthEnd.x, mouthEnd.y); // bezier curve  
  118.     CGContextStrokePath(context);  
  119. }  
  120.   
  121. @end  

容芳志 (http://blog.youkuaiyun.com/totogo2010)

本文遵循“署名-非商业用途-保持一致”创作公用协议

原文地址:http://blog.youkuaiyun.com/totogo2010/article/details/8222166

GPU八卡A100使用INT4-W4A16量化大模型实验 本实验旨在探索在环境下,对大语言模型进行权重量化的可行性、效率与性能影响。通过采用工具集成 GPTQ 算法,实现对所有线性层的权重量化(W4A16 方案最终通过lm-eval工具在GSM8K任务上对压缩模型进行评估。 阅读详情

相关推荐

calibration的“前世今生”——从simulink开发到CANape的XCP标定

整体思路 备注: elf可简单的看作为hex和map的集合,其中包括可执行的程序、变量及其对应的地址(simulink生成代码是也可以勾选生成ASAP2的a2l文件,有变量但变量对应的地址为空,只有编译后才分配地址) 定义变量是观测值还是标定值需要在simulink中的数据字典定义变量存储类型,详见simulink系列。 1. 前期准备A2L的制作 安装完成CanApe软件 , 插上CanApe硬件( 如:vector 1640A)。打开A2L编辑软件 ASAP2 Editor(注意不是ASAP2 Vi

IHTY_NUI的博客 1万+

2011斯坦福大学iOS应用开发教程学习笔记(第五课)Protocols,手势识别

第五课内容: 自动旋转、 Protocols、 手势识别、一个自定义UIView的Demo 1、自动旋转 当设备旋转时,你的controller会做什么呢?你可以控制界面是否和设备一起一起旋转。 [cpp] view plaincopy - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrient

iShareStudio 1240

ansys命令流力磁耦合仿真

文章目录前言一、力磁耦合仿真流程二、静力学仿真三、力磁耦合模型构建四、静磁学仿真总结 前言 一、力磁耦合仿真流程 力磁耦合有限元仿真流程中,首先进行静力学仿真,经过前处理模块、分析计算模块和后处理模块提取三维模型单元应力,然后根据力磁耦合方程中,通过matlab将单元应力导入到磁导率与应力的关系式中,得到单元的相对磁导率。最后采用载荷传递耦合方式,进行静磁学模拟仿真,分析计算得到该载荷下试件的磁场分布。,如下图所示为力磁耦合仿真流程图: 二、静力学仿真 下图为中心预制条形缺陷的Q235钢板试..

wsfwsf128的博客 2662

斯坦福大学公开课 iOS应用开发教程学习笔记(第五课)Protocols,手势识别

斯坦福大学iOS应用开发教程学习笔记(第五课)Protocols,手势识别 主要4部分组成:自动旋转、 Protocols、 手势识别、一个自定义UIView的Demo 1、自动旋转 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { return UII

小人物的草稿本 950

大模型学习笔记四:LangChain开发框架解析

1、模型I/O封装LLMs:大语言模型Chat Models:一般基于LLMs,但按对话结构重新封装PromptTemple:提示词模板OutputParser:解析输出2、数据连接封装Document Loaders:各种格式文件的加载器Document transformers:对文档的常用操作,如:split,filter,translate,extract metadata,etcTextr Embedding Models:文本向量化表示,用于检索等操作。

谢白羽 4282

E28 LoRa模块透传 定点传输 RSSI测试与MicroPython应用

测试说明 测试模块数:3 测试模式:配置模式和传输模式 如果没有检测到串口,首先检查是否安装串口驱动CH341SER,下载链接,提取码:vaw2 工作模式 模式(0-3) M2 M1 M0 模式介绍 备注 0 传输模式 1 0 0 串口打开,无线打开,连续透明传输 空速支持手动配置和自适应波特率自动调节;连续模式双方波特率必须一致 1 RSSI 1 0 1 串口打开,无线打开,RSSI功能打开 模块每100ms输出RSSI强度值 2 测距模式 1 1 0 保留 - 3 配置模式

GniLAY1022的博客 4242

iOS开发---解决问题的攻略

//按优先级排列 1.会用google搜索一下,搜索的时候,一定要注意你搜索的关键词,关键词要尽量的少,如果google搜索,尽量用英文。比如搜索如何检测2g,3g 。搜索内容应该是“ios detect 2g 3g”,加上ios关键字是因为detect 2g 3g 太具有通用性,搜索到的答案有可能不是ios平台的。再比如你想搜索怎么把uiimage转换成nsdata,你就可以搜“uiimage

Dev_APP的专栏 1万+

RTC 实时时钟实验

如果在 RTC_CR 寄存器中设置了相应的允许位,则在每个TR_CLK 周期中 RTC 产生一个中断(秒中断)。void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data) // 往备份区域写用户数据的函数 (这个函数的第一个参数就是寄存器的标号了,这个是通过宏定义定义的)存储在 RTC_ALR 寄存器中的可编程时间相比较,如果 RTC_CR 控制寄存器中设置了相应允许位,比较匹配时将产生一个闹钟中断。寄存器操作完成,并同步之后,设置秒钟中断。

m0_55996456的博客 1205

iOS开发---开发工具简介

成为一iOS程序开发者,首先需

Dev_APP的专栏 9831

MATLAB 论文复现——基于虚拟储能的电动汽车充放电调度策略及激励评价

文章基于虚拟储能聚合体仿真模型优化电动汽车充放电调度,并采用复合权重评价电动汽车的充电激励。根据电动汽车灵活性和系统稳定性衡量其贡献大小,并通过模糊推理系统模拟用户的充电意愿,实现对电动汽车充电的引导和优化。[1]陈朔,胡昊,方慧敏,等.基于虚拟储能的电动汽车充放电调度策略及激励评价[J/OL].系统仿真学报,1-12[2024-07-24].https://doi.org/10.16182/j.issn1004731x.joss.23-1316.基于虚拟储能的电动汽车充放电调度策略及激励评价。

sjr1478的博客 363

告别Selenium!纯Python+Requests搞定微信视频号登录Cookie(附完整代码与避坑指南)

本文详细介绍了如何利用纯Python和Requests库实现微信视频号的自动化登录,替代传统的Selenium方案。通过解析HTTP请求交互流程,提供完整的代码实现和避坑指南,显著提升爬虫效率和隐蔽性,适用于轻量化爬虫开发。

weixin_30642561的博客 312

iOS开发--从TQRichTextViewDemo中学会分析工程

下载地址: http://code4app.com/ios/TQRichTextView/5244fe9c6803fa0862000000 1.首先找到AppDelegate类,无论一个工程有多么复杂,多么多的类,但入口只有一个就是AppDelegate类的didFinishLaunchingWithOptions方法。我们阅读别人源代码的时候可以从这里入手。在TQRich

Dev_APP的专栏 6213

一个超酷的开源uHand2.0机械手掌项目

uHand2.0是深圳乐幻索尔公司开源的一款机械手掌,它长下面这个样子:1、uHand2.0外观图之前在公众号就分享过视频:学习嵌入式可以带娃,不信你们看2、uHand2.0硬件原理图看...

Bruce.yang的嵌入式之旅 4460

斯坦福大学iOS应用开发教程学习笔记(第八课)viewController生命周期

第七课的主要内容:View Controller Lifecycle ImageView ScrollView WebView 1、View Controller Lifecycle    creation  通过 一个segue或故事版的instantiateViewControllerWithIdentifer:实例化。 一般情况不要自己定义UIViewController的初

Dev_APP的专栏 4562

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

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

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

iOS 中的timer --- NSRunLoopCommonModes和Timer .NSThread和Timer.GCD中的Timer

目录(?)[-] NSRunLoopCommonModes和TimerNSThread和TimerGCD中的Timer 1. NSRunLoopCommonModes和Timer     当使用NSTimer的scheduledTimerWithTimeInterval方法时。事实上此时Timer会被加入到当前线程的Run Loop中,且模式是默认的NSDef

Dev_APP的专栏 4245

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

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

斯坦福大学iOS应用开发教程学习笔记(第一课)MVC.and.Introduction.to.Objective-C

2011年冬季斯坦福大学公开课 iOS应用开发教程是个很经典的教程,这个老头讲的很给力。做笔记总结。 第一课名称: MVC and Introduction to Objective-C 这课的主要内容有: iOS的概述  -什么是iOS MVC - 面向对象的概念 Objective-C-介绍下语言的概念 iOS包括四层 内核 内核是mach 4.x BSD

Dev_APP的专栏 3918

iOS开发---常用文件读写操作。

目录[-] [IOS]读取本地文件内容 NSError *error;   NSString *textFileContents = [NSString   stringWithContentsOfFile:[[NSBundle mainBundle]   pathForResource:@”myTextFile”   ofType:@”txt”]

Dev_APP的专栏 3722

斯坦福大学公开课 iOS应用开发教程学习笔记(第四课) Views 视图

第四课名称: Views 视图 课程开始老师怀念了一会老乔。接着介绍这次的课程分为两部分,一部分是Calculator的Demo,一部分是Views. 课程开始到第四课,其实斯坦福的课程里是有作业的,人家已经做完了第一个作业了,就是完善计算器这个程序,完成一个比较复杂的计算器: 计算器大概要完整这么多的功能,有兴趣的同学可以把这个作业的pdf下载下来自己完

Dev_APP的专栏 3636

斯坦福大学iOS应用开发教程学习笔记(第七课)Pad和iPhone的通用程序

第七课的主要内容:iPad 和iPhone的通用程序 这节课主要讲如何在一个程序里适配iPad 和iPhone。 内容简介 1、UIToolbar上面放的都是UIBarButtonItem 可以参考iOS学习之UINavigationController详解与使用(三)ToolBar 这节课的Demo是把UIToolbar拖放到iPad的故事版的顶部来使用。 2、UISpl

Dev_APP的专栏 3478

斯坦福大学iOS应用开发教程学习笔记(第六课)故事版 StoryBoard

第六课 主要内容:多个MVC的程序和故事版、UINavigationController、 Segues 1、多个MVC 前面的程序都是一个MVC,多个View时,怎么办,那就需要多个Controller。一个MVC只能控制一屏幕或更小的区域。 那如何切换两个MVC呢,用控制器群里的控制器:UINavigationController。 2、UINavigati

Dev_APP的专栏 2922

斯坦福大学iOS应用开发教程学习笔记(第二课)My First iOS App

第二课名称是: My First iOS App 我的第一个iOS应用  注意:我用的是XCode Version 4.5.2 (4G2008a)版本,SDK 是6.0,和视频教程稍微不一样。 这课主要是以一个计算器一个用为例子,教你怎么使用XCode,如何使用MVC设计模式创建应用。 我们跟着他把应用做出来,这颗学习的目的就达到了。 1、新建一个single view app

Dev_APP的专栏 2677

斯坦福大学iOS应用开发教程学习笔记(第三课)Objective-C

第二课名称是:Objective-C  回顾上节课的内容: 创建了单个MVC模式的项目显示项目的各个文件,显示或隐藏导航,Assistant Editor, Console, Object Library, Inspector等功能的使用在故事版上编辑视图,通过Ctrl+拖拽把view连接到Controller的outlet。创建新的类,比如 CalculatorB

Dev_APP的专栏 2668
上一篇: 斯坦福大学公开课 iOS应用开发教程学习笔记(第四课) Views 视图
下一篇: 斯坦福大学iOS应用开发教程学习笔记(第六课)故事版 StoryBoard
「已注销」
博客等级 码龄12年 28粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值