摘要: #include #include #include void test(){//汉字输出 printf("THIS IS TEST\n"); printf("My age is %d\n",26); printf("My age is %4d 发现没?26前面多了两个空格\n",26); ... 阅读全文
posted @ 2015-08-02 14:08 OIMMZC 阅读(1232) 评论(0) 推荐(0) 编辑
摘要: #include #define sum 3+4//宏定义是原封不动的使用used for test4#include //used for test8~9#include //used for test8~9void test(){//数组输出 //int a[5]={1,2,3,4,5}; ... 阅读全文
posted @ 2015-08-02 14:05 OIMMZC 阅读(1497) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main(int argc, const char * argv[]) { // insert code here... printf("Hello, World!\n"); int a,b,i; { sran... 阅读全文
posted @ 2015-08-02 14:02 OIMMZC 阅读(724) 评论(0) 推荐(0) 编辑
摘要: #include void test(){//1+2+3+4+.....+100 int a,b; a=0; b=0; for ( ; a#includeint main(){int n,i,k;printf("please enter a integer number:n=?");scan... 阅读全文
posted @ 2015-08-02 14:00 OIMMZC 阅读(694) 评论(0) 推荐(0) 编辑
摘要: #include //输入输出头文件#include#include//局部被调用函数1 成绩检测void test(){ int b;printf("请输入你的成绩\n");scanf("%d",&b);if (b>=0&&b<=100) { printf("分数正常\n等待分析。。。\n"... 阅读全文
posted @ 2015-08-02 13:56 OIMMZC 阅读(547) 评论(0) 推荐(0) 编辑
摘要: //求两个函数中的较大者的MAX函数#include int main(int argc, const char * argv[]) { printf("input two nimbers\n"); int max(int x,int y); int a, b,c; scanf("%d,%d... 阅读全文
posted @ 2015-08-02 13:53 OIMMZC 阅读(5079) 评论(2) 推荐(0) 编辑
摘要: #import @interface AppDelegate : UIResponder { int k;}@property (strong, nonatomic) UIWindow *window;@end#import "AppDelegate.h"@interface AppDelegat... 阅读全文
posted @ 2015-08-02 13:42 OIMMZC 阅读(330) 评论(0) 推荐(0) 编辑
摘要: #import @interface AppDelegate : UIResponder {@public NSInteger timeValue;}@property (strong, nonatomic) UIWindow *window;@end#import "AppDelegate.h"... 阅读全文
posted @ 2015-08-02 13:34 OIMMZC 阅读(271) 评论(0) 推荐(0) 编辑
摘要: //声明非原创步骤:1.打开Xcode,单机CreatanewXcodeproject2.左边选择ios下Application,右边选择singleviewApplication3.填写项目名称单机Next4.ViewController.h中定义成员和方法//// ViewController... 阅读全文
posted @ 2015-08-02 13:24 OIMMZC 阅读(621) 评论(0) 推荐(0) 编辑
摘要: //此作品非原创#import"ACViewController.h"@interfaceACViewController()@end@implementationACViewController- (void)viewDidLoad{[superviewDidLoad];// Do any add... 阅读全文
posted @ 2015-08-02 13:21 OIMMZC 阅读(773) 评论(0) 推荐(0) 编辑
摘要: //此处标明非原创实现iPhone漂亮的动画效果主要有两种方法, 一种是UIView层面的, 一种是使用CATransition进行更低层次的控制, 第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例... 阅读全文
posted @ 2015-08-02 13:15 OIMMZC 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1. 图片缩放:代码- (UIImage*)resizeImage:(UIImage*)image toWidth:(NSInteger)width height:(NSInteger)height{ // Create a graphics context with the target siz... 阅读全文
posted @ 2015-08-02 13:11 OIMMZC 阅读(341) 评论(0) 推荐(0) 编辑
摘要: //非原创UIProgressView顾名思义用来显示进度的,如音乐,视频的播放进度,和文件的上传下载进度等。下面以一个简单的实例来介绍UIprogressView的使用。@interfaceActivityViewController :UIViewController{ UIProgressVi... 阅读全文
posted @ 2015-08-02 13:06 OIMMZC 阅读(504) 评论(0) 推荐(0) 编辑
摘要: UIActivityIndicatorView实例提供轻型视图,这些视图显示一个标准的旋转进度轮。当使用这些视图时,最重要的一个关键词是小。20×20像素是大多数指示器样式获得最清楚显示效果的大小。只要稍大一点,指示器都会变得模糊。iPhone提供了几种不同样式的UIActivityIndicato... 阅读全文
posted @ 2015-08-02 13:04 OIMMZC 阅读(149) 评论(0) 推荐(0) 编辑
摘要: NSTimer是Cocoa中比较常用的定时器类,基本操作如下:handleTimer方法可以自行定义。在需要的地方创建timer即可,handleTimer就可以每0.5秒执行一次。- (void) handleTimer: (NSTimer *) timer{ //在这里进行处理}NSTimer ... 阅读全文
posted @ 2015-08-02 12:57 OIMMZC 阅读(201) 评论(0) 推荐(0) 编辑
摘要: //非原创iPhone Tableview分批显示数据是本文要介绍的内容,主要讲解的是数据的显示。iPhone屏幕尺寸是有限的,如果需要显示的数据很多,可以先数据放到一个table中,先显示10条,table底部有一察看更多选项,点击察看更多查看解析的剩余数据。基本上就是数据源里先只放10条, 点击... 阅读全文
posted @ 2015-08-02 12:27 OIMMZC 阅读(139) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2015-08-02 12:24 OIMMZC 阅读(2) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2015-08-02 12:20 OIMMZC 阅读(4) 评论(0) 推荐(0) 编辑
摘要: //非原创 UITableView是app开发中常用到的控件,功能很强大,多用于数据的显示。下面以一个简单的实例来介绍tableview的基本用法。(适合新手,高手飘过)@interfaceTableViewTestViewController :UIViewController{ UITable... 阅读全文
posted @ 2015-08-02 12:19 OIMMZC 阅读(152) 评论(0) 推荐(0) 编辑
摘要: //非原创UItextField通常用于外部数据输入,以实现人机交互。下面以一个简单的登陆界面来讲解UItextField的详细使用。//用来显示“用户名”的labelUILabel* label1 = [[UILabelalloc]initWithFrame:CGRectMake(15,65,70... 阅读全文
posted @ 2015-08-02 12:18 OIMMZC 阅读(169) 评论(0) 推荐(0) 编辑