iphone学习
苹果开发者联盟的网址:http://www.apple.com.cn/developer/
objective-C on the Mac (Aoress) 作者:Dakrymple Scott Knadter
动态创建按钮的代码:
UIButton *Mybutton = [[UIButton alloc ] initWithFrame:aRect]
@property 关键字后面紧跟一些可选的属性(位于圆括号里面)它进一步定义了编译器如何创建访问方法和修改方法
@property (retain , nonatomic) UILable * statusText
@systhesize statusText
@systhesize通知编译器自动为我们创建访问方法和修改方法,添加了次行代码之后,我们的类中已存在两个不可见的方法:statusText和 setStatusText,我们并没有编写这两个方法,他们是制动创建的。自己在试验中发现,要想使用systhesize属性,必须有property(retain)。
用户控件共有3种基本的形式:活动、静态、和被动。按钮是活动的控件,点击它可以出发一段代码,标签是静态控件,可以通过代码修改它,但用户不能对其进行任何操作,被动控件紧用于存储用户输入值,直到完成为止,这些控件不触发任何操作,但可以和用户交互,例如网页上的文本
NSCustomImageRep
NSPDFImageRep
别人再好,关我什么事。我再不好,关别人什么事。有些事,不是我不在乎,而是我在乎了又能怎样?
NSPageController
关于证书的类:SecCertificateRef,SFCertificatePanel,
SFChooseIdentityPanel
证书选择的过程:
首先是使用runModalForIdentities函数建立SFChooseIdetifyPanel对话框,这个函数的定义如下
- (NSInteger)runModalForIdentities:(NSArray *)identities message:(NSString *)message
参数:idetititis:
An array of identity objects (objects of type SecIdentityRef
. Use the SecIdentitySearchCopyNext
function (in Security/SecIdentitySearch.h) to find identity objects.
- message
-
A message string to display in the panel.
注意:This method returns NSOKButton
if the default button is clicked, or NSCancelButton
if the alternate button is clicked.
Use the identity
method to obtain the identity chosen by the user.
下面的问题就是如何获得identities了,他是SecIdentityRef类型的,那么问题就转化为如何初始化这个对象呢?SecIdentityRef的定义如下:
typedef struct __SecIdentity *SecIdentityRef;
A SecIdentityRef
object contains a SecKeyRef
object and an associated SecCertificateRef
object.
文档中说使用函数获取SecIdentityRef结构体类型的变量,那么这个函数的定义如下
SecIdentitySearchCopyNext
Finds the next identity matching specified search criteria (Deprecated in OS X v10.7.)
OSStatus SecIdentitySearchCopyNext (
SecIdentitySearchRef searchRef,
SecIdentityRef *identity
);
Parameters
- searchRef
-
An identity search object specifying the search criteria for this search. You create the identity search object by calling the
SecIdentitySearchCreate
function. - identity
-
On return, points to the identity object of the next matching identity (if any). Call the
CFRelease
function to release this object when finished with it.
Return Value
A result code. When there are no more identities that match the parameters specified to SecIdentitySearchCreate
, errSecItemNotFound
is returned. See “Certificate, Key, and Trust Services Result Codes.”
iphone学习的更多相关文章
- iOS/iPhone学习系列、代码教程
part 1--入门: 1. xcode 版本下载 以及 iphone sdk 下载: 最新版本在此下载: http://developer.apple.com/devcenter/ios/index ...
- 非常优秀的iphone学习文章总结!
This site contains a ton of fun tutorials – so many that they were becoming hard to find! So I put t ...
- 一些iOS高效开源类库
因为iOS SDK相对比较底层,所以开发者就得受累多做一些体力活.不过幸运的是,有很多第三方的类库可以用来简化很多不必要的工作.笔者整理了一下在本人学习过程中用到的一些比较有用Objective-C开 ...
- 虚拟机IOS开发环境搭建教程
来源:http://www.cnblogs.com/xiaoyaoju/archive/2013/05/21/3091171.html 安装条件: 硬件:一台拥有支持虚拟技术的64位双核处理器和2GB ...
- windows下利用VMware安装mac:构建…
安装条件: 硬件:一台拥有支持虚拟技术的64位双核处理器和2GB以上内存的PC. 注意:运行MAC OS,需要电脑支持虚拟技术(VT),安装时,需要将VT启动,在BIOS中开启. 关于如何检测你的电脑 ...
- iPhone应用开发 UITableView学习点滴详解
iPhone应用开发 UITableView学习点滴详解是本文要介绍的内容,内容不多,主要是以代码实现UITableView的学习点滴,我们来看内容. -.建立 UITableView DataTab ...
- 我常用的iphone开发学习网站[原创]
引用地址:http://www.cnblogs.com/fuleying/archive/2011/08/13/2137032.html Google 翻译 Box2d 托德的Box2D的教程! Bo ...
- ios学习--iphone 实现下拉菜单
原文地址:ios学习--iphone 实现下拉菜单作者:sdglyuan00 #import @interface DropDown1 : UIView <</span>UITabl ...
- iPhone深度学习-ARM
平台 xCode 5.0 iPhone 4 在Building setting中的 Architectures 部分,有这么一个选项 Architectures,这里有一些选项是 Armv7 和Arm ...
随机推荐
- git clone ssh permissions are too open 解决方案。
错误如图所示 方案如下 https://stackoverflow.com/questions/9270734/ssh-permissions-are-too-open-error
- ActiveMQ应用
一. 概述与介绍 ActiveMQ 是Apache出品,最流行的.功能强大的即时通讯和集成模式的开源服务器.ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provide ...
- Spark SQL概念学习系列之Spark SQL入门(八)
前言 第1章 为什么Spark SQL? 第2章 Spark SQL运行架构 第3章 Spark SQL组件之解析 第4章 深入了解Spark SQL运行计划 第5章 测试环境之搭建 第6章 ...
- C# 调用非托管函数
C#通过DllImport可以直接调用Windows中的一些功能.C++中已经编写好的一些方法: DllImport所在的名字空间:System.Runtime.InteropServices; Dl ...
- jquery.autocomplete.js用法及示例,小白进
8 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ...
- 6.12---esultMap查询所有
- python自动化--语言基础线程、生产者消费者示例
进程与线程的区别:进程不共享空间,线程共享地址空间 线程共享空间优缺点:优点:多线程给用户的体验好些,打开时占用的内存比进程少缺点:共享地址空间会相互干扰,甚至有影响 import threading ...
- MFC_2.1使用单选和多选框
使用单选和多选框 单选 1.拖控件 设置名字,CTRL+D设置顺序,属性设置第一个GROUP为TRUE: 2.设置第一个按钮绑定变量为 值 INT型 名称m_RadioIndxe; 3.设置单击响应内 ...
- radiobutton group
1. 环境:VS2010 2. 分组 将radio1.radio2.radio3分为1组,radio4.radio5分为另一组: 方法:设置 radio1 的 属性: group.tabstop ...
- CSS 命名规范 BEM 思想
Part.1 何为 BEM? BEM :Block ( 块 ) 丶Element ( 元素 ) 丶Modifier ( 修饰符 ) 出 处:是由 Yandex 团队提出的一种前端命名方法论 优 点:命 ...