ITeye博客

niCe的博客

niCe · 共 25 篇文章

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

前段时间利用业余时间做了2个app,采用的模式为免费+广告。考虑到用户大多面向于国内,所以广告代理选的也是国内一家广告代理商。其实,我并不是一定就想要通过此手段去赚钱什么的,只不过想试试水而已。想了解下android平台下广告收益到底如何。没想到。。。结果令人失望啊。。。。 2个app都陆续发到了各个第三方的market上,2周后通过market上的下载数据可以看到有个app下载已经过W了。(虽然这不算多,可以说比较少,呵呵。但是我觉得还算一般了。。)每天填充率91%+,点击率才几个。。。 。从market上用户的反馈来看,很多用户都抱怨说广告讨厌,应该去掉广告。可是作为我们开发者,本来一个…

2011-01-17 17:15 · 其他 · 评论(23)

TableView 下拉刷新

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

2010-12-31 14:48 · 界面相关 · 评论(0)

如何为UINavigationBar设置背景图片

///////////////////////////////////////////////////////// /* input: The image and a tag to later identify the view */ @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"title_bg.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.s…

2010-12-31 10:48 · 界面相关 · 评论(0)

给 TextView 加个圆角

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

2010-12-31 10:47 · 界面相关 · 评论(0)

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

1 随机数的使用 头文件的引用 #import <time.h> #import <mach/mach_time.h> srandom()的使用 srandom((unsigned)(mach_absolute_time() & 0xFFFFFFFF)); 直接使用 random() 来调用随机数 2 在UIImageView 中旋转图像 float rotateAngle = M_PI; CGAffineTransform transform =CGAffineTransformMakeRotation(rotateAngle); imageView.transform = transfo…

2010-12-31 10:45 · 代码 · 评论(0)

设置 UITableViewCell 与导航条间距

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

2010-12-31 10:43 · 界面相关 · 评论(0)

动态更新Table Cell

NSIndexPath *indexPath = [NSIndexPath indexPathForRow: row inSection: 0]; NSArray *array = [NSArray arrayWithObject: indexPath]; [_playlistTableView reloadRowsAtIndexPaths: array withRowAnimation: UITableViewRowAnimationNone];

2010-12-30 17:58 · 界面相关 · 评论(0)

UITableView 异步加载图片

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { [NSThread detachNewThreadSelector:@selector(startImageread:) toTarget:self withObject:indexPath]; } startImageread是获取照片的方法,我是从本地读取的 -(void)startImageread:(NSIndexPath *)indexPath { NSAutorelease…

2010-12-30 16:16 · 界面相关 · 评论(0)

得到Iphone屏幕分辨率

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

2010-12-30 15:15 · 界面相关 · 评论(0)

解决断点无法停的问题

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

2010-12-30 15:11 · 其他 · 评论(0)

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

效果如图: 代码:

2010-12-30 15:10 · 界面相关 · 评论(0)

iPhone上读取ansi字符串的例子

iPhone的NSString并不支持ansi的字符串(比如咱们常用的gb2312), 因此如果要读取的话, 需要转换为UTF-8的 而iPhone上自带了libiconv库, 于是这个转换变的就比较简单了 首先在工程的Framework部分加入 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libiconv.dylib 当然, 中间那个iPhoneOS3.0.sdk需要换成你当前使用的SDK版本 实际转换过程也就4步. 1, 引入iconv库并添加头文件 2, 利用iconv_op…

2010-12-30 14:36 · 代码 · 评论(0)

iphone 单例全局变量写法

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

2010-12-30 14:33 · 代码 · 评论(0)

修改View显示位置

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

2010-12-30 14:28 · 界面相关 · 评论(0)

用UITableView 进行多选的代码例子

代码如下:

2010-12-30 14:19 · 代码 · 评论(0)