- 浏览: 46186 次
- 性别:
- 来自: 河南
-
最新评论
文章列表
Interface & Implementation
@interface and @implementation are the first things you learn about when you start Objective-C:
@interface...@end
@implementation...@end
What you don't learn about until later on, are categories and class extensions.
Categories allow you to extend the behavi ...
NSPredicate is a Foundation class that specifies how data should be fetched or filtered. Its query language, which is like a cross between a SQL WHERE clause and a regular expression, provides an expressive, natural language interface to define logical conditions on which a collection is searched. ...
NSFileManager is Foundation's high-level API for working with file systems. It abstracts Unix and Finder internals, providing a convenient way to create, read, move, copy, and delete files & directories on local or networked drives, as well as iCloud ubiquitous containers.
File systems are a c ...
可以从数据库中的系统表 sysobjects 得到想要的数据表信息,具体SQL语句如下:
查看数据库中表名:
select name from sysobjects where type = 'U';
由于系统表sysobjects保存的都是数据库对象,其中type表示各种对象的类型,具体包括:
U = 用户表
S = 系统表
C = CHECK 约束
D = 默认值或 DEFAULT 约束
F = FOREIGN KEY 约束
L = 日志
FN = 标量函数
IF = 内嵌表函数
P =
当把应用程序从模拟器删除(长按AppIcon,图标晃动,出现叉号,点击叉号。点击主屏幕按钮就不晃动了)之后,再次运行应用程序后,Stop按钮就变灰色,应用程序停止运行,只有当点击模拟器上的图标才能继续。
这是因为点击了Clean,删除后直接运行就不会出现这个问题
一旦Clean,那么重启模拟器就好了
这是由于旋转时没有定位屏幕的位置,我们可以写一个旋转时的方法:
-(void)rotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
switch(toInterfaceOrientation)
{
case UIInterfaceOrientationLandscapeLeft:
self.view.transform=CGAffineTransformMakeRotation(3.1415926*(-90));//向右旋转 ...
Q: My application saves data to the application's bundle, which works fine in the iPhone Simulator. However, when I run on a device, my data cannot be saved. What's going on?A: The different behaviors you are seeing are due to differences between the iPhone Simulator and the actual device. In the s ...
开发环境使用的是目前为止最新的稳定版软件:Mac OS X Lion 10.7 + Xcode 4.1
目前Xcode 4.2 Preview版也已经发布,据说其修改方法跟4.1非常类似,只改动了一行代码,请参看参考文章的第二篇。本文仍以4.1版本为例。
更新:现在Xcode 4.2正式版和iOS 5均已发布,下面补充上4.2的修改方法。(2011-10-24)
各步骤会标明版本,比如(Xcode4.1请执行)和(Xcode4.2请执行),4.2.1的修改方法与4.2完全相同
未标明的步骤为两个版本均需执行的步骤!
更新:现在Xcode 4.3已发布,修改方法类似,Xcode ...
I've been on a search for a really good Sqlite Admin tool since I started iPhone programming a year ago. I've been mainly using the Firefox Plugin 80-90% or the time and Sqlite Administrator the rest of the time. I decided to do some more searching over the last couple of days and here's my repor ...
If you go into the UIKit_Framework and look at the NSNibDeclarations.h header file, you’ll see that they’re defined like this: macros(宏)
#define IBAction void
#define IBOutlet
#define IBOutletCollection(ClassName)
Confused? These two keywords do absolutely nothing as far as th ...
revalidate()方法并不是马上改变组件大小,而是标记该组件需要改变大小,这样就避免了多个组件都要改变大小时带来的重复计算,在javax.swing.JComponent中定义的。
validate()方法一旦被调用就立刻改变该容器内所有组件的大小在java.awt.Container中定义的。
首先要设置默认关闭操作为:什么也不做setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);然后添加Window监听
this.addWindowListener(new WindowListener()
{
public void windowClosing(WindowEvent we)
{
int option = JOptionPane.showConfirmDialog(null,"是否保存?","保 存", ...
一、C语言中可变参数列表函数写法:1.导入头文件: #include<stdarg.h>2.声明一个列表宏:va_list arg;3. 用宏va_start将该变量初始化为一个参数列表。作用是将调用时传递的参数列表复制到va_list变量中,并指明开始的参数。va_start()有两个参数:(va_list列表变量,紧挨着省略号前的参数)4.va_arg(va_list列表变量,参数类型),每执行一次,就依次向下获得一个参数5.va_end(arg) 释放变量列表空间
#include<stdio.h>
#include<stdarg.h>
int ...