摘要:
#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
阅读(1259)
评论(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
阅读(1544)
评论(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
阅读(746)
评论(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
阅读(717)
评论(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
阅读(566)
评论(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
阅读(5169)
评论(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
阅读(337)
评论(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
阅读(276)
评论(0)
推荐(0)
摘要:
//声明非原创步骤:1.打开Xcode,单机CreatanewXcodeproject2.左边选择ios下Application,右边选择singleviewApplication3.填写项目名称单机Next4.ViewController.h中定义成员和方法//// ViewController... 阅读全文
posted @ 2015-08-02 13:24
OIMMZC
阅读(637)
评论(0)
推荐(0)
摘要:
//此作品非原创#import"ACViewController.h"@interfaceACViewController()@end@implementationACViewController- (void)viewDidLoad{[superviewDidLoad];// Do any add... 阅读全文
posted @ 2015-08-02 13:21
OIMMZC
阅读(809)
评论(0)
推荐(0)
摘要:
//此处标明非原创实现iPhone漂亮的动画效果主要有两种方法, 一种是UIView层面的, 一种是使用CATransition进行更低层次的控制, 第一种是UIView,UIView方式可能在低层也是使用CATransition进行了封装,它只能用于一些简单的、常用的效果展现,这里写一个常用的示例... 阅读全文
posted @ 2015-08-02 13:15
OIMMZC
阅读(189)
评论(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
阅读(354)
评论(0)
推荐(0)
摘要:
//非原创UIProgressView顾名思义用来显示进度的,如音乐,视频的播放进度,和文件的上传下载进度等。下面以一个简单的实例来介绍UIprogressView的使用。@interfaceActivityViewController :UIViewController{ UIProgressVi... 阅读全文
posted @ 2015-08-02 13:06
OIMMZC
阅读(512)
评论(0)
推荐(0)
摘要:
UIActivityIndicatorView实例提供轻型视图,这些视图显示一个标准的旋转进度轮。当使用这些视图时,最重要的一个关键词是小。20×20像素是大多数指示器样式获得最清楚显示效果的大小。只要稍大一点,指示器都会变得模糊。iPhone提供了几种不同样式的UIActivityIndicato... 阅读全文
posted @ 2015-08-02 13:04
OIMMZC
阅读(160)
评论(0)
推荐(0)
摘要:
NSTimer是Cocoa中比较常用的定时器类,基本操作如下:handleTimer方法可以自行定义。在需要的地方创建timer即可,handleTimer就可以每0.5秒执行一次。- (void) handleTimer: (NSTimer *) timer{ //在这里进行处理}NSTimer ... 阅读全文
posted @ 2015-08-02 12:57
OIMMZC
阅读(207)
评论(0)
推荐(0)
摘要:
//非原创iPhone Tableview分批显示数据是本文要介绍的内容,主要讲解的是数据的显示。iPhone屏幕尺寸是有限的,如果需要显示的数据很多,可以先数据放到一个table中,先显示10条,table底部有一察看更多选项,点击察看更多查看解析的剩余数据。基本上就是数据源里先只放10条, 点击... 阅读全文
posted @ 2015-08-02 12:27
OIMMZC
阅读(144)
评论(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
阅读(162)
评论(0)
推荐(0)
摘要:
//非原创UItextField通常用于外部数据输入,以实现人机交互。下面以一个简单的登陆界面来讲解UItextField的详细使用。//用来显示“用户名”的labelUILabel* label1 = [[UILabelalloc]initWithFrame:CGRectMake(15,65,70... 阅读全文
posted @ 2015-08-02 12:18
OIMMZC
阅读(175)
评论(0)
推荐(0)
摘要:
//非原创UIbutton作为简单且频繁被使用的控件,其地位在整个app开发中不可小视。在IB中使用button相对来说很简单,很容易上手,但在多视图开发中button通常会被即时生成,并设置其属性和功能,即通过代码生成。如下是我对button的理解。//创建圆角button UIButton*b... 阅读全文
posted @ 2015-08-02 12:17
OIMMZC
阅读(165)
评论(0)
推荐(0)
摘要:
UIslider是一个方便的控件,让用户能够以可视化的方式设置指定范围内的值。和按钮一样,滑块也能响应事件,还可像文本框一样被读取。如果希望用户对滑块的调整立刻影响应用程序,则需要让他触发操作。UISlider *slider = [[UISlider alloc] initWithFrame:CG... 阅读全文
posted @ 2015-08-02 12:16
OIMMZC
阅读(171)
评论(0)
推荐(0)
摘要:
//非原创当用户输入不仅仅是布尔值时,可使用分段控件(UISegmentedControl)。分段控件提供一栏按钮(有时称为按钮栏),但只能激活其中一个按钮。分段控件会导致用户在屏幕上看到的内容发生变化。它们常用于在不同类别的信息之间选择,或在不同的应用屏幕之间切换。下面介绍基本属性和基本方法的使用... 阅读全文
posted @ 2015-08-02 12:11
OIMMZC
阅读(163)
评论(0)
推荐(0)
浙公网安备 33010602011771号