自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

谈谈android下免费+广告的盈利模式

     前段时间利用业余时间做了2个app,采用的模式为免费+广告。考虑到用户大多面向于国内,所以广告代理选的也是国内一家广告代理商。其实,我并不是一定就想要通过此手段去赚钱什么的,只不过想试试水而已。想了解下android平台下广告收益到底如何。没想到。。。结果令人失望啊。。。。     2个app都陆续发到了各个第三方的market上,2周后通过market上的下载数据可以看到有...

2011-01-17 17:15:45 253 1

原创 TableView 下拉刷新

参见:https://github.com/enormego/EGOTableViewPullRefresh

2010-12-31 14:48:50 87

原创 如何为UINavigationBar设置背景图片

//////////////////////////////////////////////////////////* input: The image and a tag to later identify the view */@implementation UINavigationBar (CustomImage)- (void)drawRect:(CGRect)rect {...

2010-12-31 10:48:59 91

原创 给 TextView 加个圆角

 给 TextView 加上圆角无疑会让界面更漂亮更有苹果味儿   #import <QuartzCore/QuartzCore.h> [self.content.layer setBackgroundColor:[[UIColor whiteColor] CGColor]]; [self.content.layer setBorderColor...

2010-12-31 10:47:08 105

原创 iPhone 开发过程中的一些小技术的总结

1 随机数的使用        头文件的引用        #import <time.h>        #import <mach/mach_time.h>        srandom()的使用        srandom((unsigned)(mach_absolute_time() & 0xFFFFFFFF));        直接使用 random()...

2010-12-31 10:45:02 64

原创 设置 UITableViewCell 与导航条间距

 UITableView 的 cell 默认出现在 uitableview 的第一行,如果你想自定义 UITableViewCell 与导航条间距的话,可以使用下面这行代码  tableview.tableHeaderView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)]autorelease];  ...

2010-12-31 10:43:39 174

原创 动态更新Table Cell

NSIndexPath *indexPath = [NSIndexPath indexPathForRow: row inSection: 0]; NSArray *array = [NSArray arrayWithObject: indexPath]; [_play...

2010-12-30 17:58:04 106

原创 UITableView 异步加载图片

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { [NSThread detachNewThreadSelector:@selector(startImageread:) toTarget:self with...

2010-12-30 16:16:59 111

原创 得到Iphone屏幕分辨率

[NSScreen mainScreen].applicationFrame.size.height..... 

2010-12-30 15:15:56 125

原创 解决断点无法停的问题

com.apple.Boot.plist 中 增加启动参数 :std_dyld=1,重启电脑,断点就可以用了

2010-12-30 15:11:59 170

原创 一个界面显示“等待”处理的共有类

效果如图:  代码:

2010-12-30 15:10:24 99

原创 iPhone上读取ansi字符串的例子

iPhone的NSString并不支持ansi的字符串(比如咱们常用的gb2312), 因此如果要读取的话, 需要转换为UTF-8的而iPhone上自带了libiconv库, 于是这个转换变的就比较简单了首先在工程的Framework部分加入 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/...

2010-12-30 14:36:55 116

原创 iphone 单例全局变量写法

interface MySingleton : NSObject{⇒① NSString *testGlobal;}+ (MySingleton *)sharedSingleton;⇒②@property (nonxxxx,retain) NSString *testGlobal;@end@implementation MySingleton⇒③@...

2010-12-30 14:33:18 94

原创 修改View显示位置

SettingViewController* settingView = [[SettingViewController alloc] initWithNibName:@"SettingViewController" bundle:nil];CGRect rect = CGMakeRect(x,y,width,height);[settingView.view setFrame: re...

2010-12-30 14:28:54 215

原创 用UITableView 进行多选的代码例子

 代码如下:

2010-12-30 14:19:05 86

原创 iPhone中如何从Application Bundle中读取文件

首先必须将文件加入Xcode工程的Resources目录。然后可以如下访问文件,假设文件为MyFile.txt: NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"]; NSData *myData = [NSData dataWithContentsOfFile:fil...

2010-12-30 14:09:44 93

原创 iPhone中定时器NSTimer使用方法

- (void) applicationDidFinishLaunching: {NSTimer *_timer = [[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(onTimer) userInfo:nil repeats:YES] retain];}// call fun...

2010-12-30 14:07:48 96

原创 UIApplication

1, statusBar//to obtain the statusBar frame[[UIApplication sharedApplication] statusBarFrame];//hidden statusBar[[UIApplication sharedApplication] setStatusBarHidden:YES animat...

2010-12-30 13:39:34 74

原创 Iphone显示正在加载

//// ActivityView.h//// Copyright 2010. All rights reserved.//#import <UIKit/UIKit.h>#define kAnimationDurationStart 2#define kAnimationDurationEnd 1@interface ActivityVi...

2010-12-30 13:37:32 203

原创 navigation bar item button样式

UIButton *BackBtn = [[UIButton alloc] initWithFrame:CGRectMake(0.0, 100.0, 62.0, 29.0)]; [BackBtn setImage:[UIImage imageNamed:@"BackBtn.png"] forState:UIControlStateNormal]; [BackBtn addTarget:s...

2010-12-30 11:58:01 99

原创 navivation 上改标题和加按钮

NavigationBar.topItem.title = @"";NavigationBar.topItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(BtnPressed:)]...

2010-12-30 11:51:59 79

原创 UINavigationBar + UISegmentedControl

//navigationBar通常只有左、右两个按钮,但可以//通过添加UISegmentedControl来增加控制按钮UINavigationBar* _navBar;UISegmentedControl* _SegCtl; _navBar = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 3...

2010-12-30 11:50:13 80

原创 设置Navivation标题背景

UIImage *image = [UIImage imageNamed:@"历史标题.png"];UIImageView *imageView = [[UIImageView alloc] initWithImage:image];[self.navigationController.navigationBar addSubview:ImageView];  

2010-12-30 11:47:45 82

原创 Iphone常用代码

更改cell选中的背景 Java代码 //创建一个UIView对象    UIView *myview = [[UIView alloc] init];   //设置UIView对象的外观大小    myview.frame = CGRectMake(0, 0, 320, 47);    //设置UIView对象的背景色。 [UIColor c...

2010-12-30 11:43:05 252

原创 用了UINavigationController后,UITableView reloadData或viewWillAppear失效

今天在做开发的时候,忽然发现在视图的viewWillAppear:方法中添加: [self.tableView reloadData];  不起作用,viewWillAppear:这个方法根本没有调用 后来发现原来用了UINavigationController后,viewWillAppear方法是没有效果的,要用UINavigationControllerDelegate的– nav...

2010-12-30 11:28:46 173

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除