- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 objective-c 中对于类的使用
要在A类中使用B类 必须引入 在接口中按如下定义如果只需要让A类知道B类 但是不使用B类中的属性和方法 (常用与@Interface中的定义)#import@class ClassB@Interface如果要使用类中的属性和方法 就要引入类得头文件 如下 #import
2011-03-31 17:28:00 540
原创 objective-c 中定义多参数的方法
这定义形式真是麻烦得不行@interface Demo:NSOBjectint i;int j;@property int i,j;-(void)SetNum: (int) nA andNb:(int) nB; //nA,nB为传入参数@end//实现中@implement Demo@synthesize i,j;-(void) SetNum:(int) nA adnNb:(int) nB{ i=nA; j=nB;}
2011-03-31 14:34:00 7567 1
原创 objective-c 自动封装类的属性
//oc中称为合成存取器方法//第一步是在接口中使用@property指令标识属性@interface Demo:NSObject{ int numA; int numB;}@property int numA,numB;-(void)print;-(int)GetTotalNum;@end//第二部是在实现中 使用@synthesize指令#import "Fraction.h"@implement Demo@synthesize numA,num
2011-03-31 14:02:00 1081
原创 使用插件给xcode添加自动完成功能
<br />转自<br />http://osxdaily.com/2010/05/27/code-completion-in-xcode/<br /> <br /> Code completion in Xcode<br /> <br /><br />Code completion is one of the more useful features when you’re developing since it allows you to write code faster. While Code co
2011-03-29 00:38:00 4193
原创 objective-c下的NSString字符串操作
//1、创建常量字符串。 NSString *astring = @"This is a String!";//2、创建空字符串,给予赋值。 NSString *astring = [[NSString alloc] init]; astring = @"This is a String!"; NSLog(@"astring:%@",astring); [astring release];//3、在以上方法中,提升速度:initWithString方法 NSString
2011-03-28 23:59:00 2346 1
原创 C# Ini读写类
<br />using System;using System.Collections.Generic;using System.Runtime.InteropServices;using System.IO;using System.Text;namespace BRO{ public class INIClass { public string inipath; [DllImport("kernel32")]
2011-03-24 09:11:00 958
原创 C#拖動無窗口標題
<br />新建一個類<br /> <br />using System.Text;using System.Runtime.InteropServices;using System.Windows.Forms;namespace BRO{ class DragControl { //c#拖动无标题窗体 [DllImport("user32.dll")] private static extern bool Relea
2011-03-24 09:08:00 791
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人