工作记录

site:hi.baidu.com/addcn linux,php,mysql

tableview中cell的设置

http://hi.baidu.com/cxh1984/blog/item/aecb8f8290e9658ff703a680.html

7.1 创建表

(1) 创建一个UITableViewController的子类

@interface MyTableViewController : UITableViewController {

}

-(id)init; 

-(void)dealloc;

添加数据源, 由三个函数来回答数据绑定的请求:numberOfSectionsInTableView, numberOfRowsInSection 和 cellForRowAtIndexPath.

用numberOfSectionsInTableView方法来返回table中有几个组.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

{

  return 1;

}

用numberOfRowsInSection方法来返回每个组里有几行

- (NSInteger)tableView:(UITableView *)tableView

 numberOfRowsInSection:(NSInteger)section 

{

  return nRecords;

}

最后用cellForRowAtIndexPath来得到一个包含每一行显示信息的UITableViewCell对象. UITableViewCell类支持文本和图像,编辑和删除确认等功能. 这些信息会保存在表队列里,用来至此翻页等功能,但是内存

http://bukkake.iteye.com/blog/941164

当前需求

在做登录模块时,需要做登录的历史记录,存储本机所有登录的用户的用户名密码,以及登录策略如是否记住密码,是否自动登录等。具体实现之前,我认为这个需求看样子并不需要SQLite,因为登录用户不可能太多,而且存储的字段也就四个而已,估计用NSUserDefaults存一下数组就结了。

初遇困难

令我沮丧的是,这么一个明确的需求竟然一时半会都没有完成,用户登陆信息明明很简单的

Objective-c代码  

@interface LoginUserInfo : NSObject  

{  

    NSString *username_;  

    NSString *password_;  

    BOOL     remember_;  

    BOOL     autoLogin_;  

}  

@property (nonatomic, copy) NSString *username;  

@property (nonatomic, copy) NSString *password;  

@property (nonatomic, assign) BOOL remember;  

@prope

http://www.devdiv.com/home.php?mod=space&uid=65440&do=blog&id=2871

1. 定义一个方法

update

2.订阅通知

 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(update) name:@"update" object:nil]

3. 在要发出通知消息的地方

[[NSNotificationCenter defaultCenter] postNotificationName:@"update" object:nil];

----------------------------

虚拟键盘显示和消失的通知

[[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(keyboardWasShown:)

name:UIKeyboardDidShowNotification

object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(keyboardWasHidden:)

name:UIKeyboardDidHideNotification

object:nil];

------

- (void)keyboardWasShown:(NSNotification *) aNotification{

if(keyboardShown)

return;

NSDictionary *info = [aNotification userInfo];//获取通知信息

//get the size

FROM:http://www.icodeblog.com/2010/04/22/how-to-integrate-google-analytics-tracking-into-your-apps-in-7-minutes/

Pageview method

Here is an example of a pageview when the user first launches the app.  Put this code inside of your applicationDidFinishLaunching method.

NSError*error;if(![[GANTracker sharedTracker] trackPageview:@"/app_launched" withError:&error]){// Handle error here}

Note that the “app_launched” is essentially our page name similar to index.html or aboutus.php. You can add this code anywhere in you app that you want to add a page view. Make sure you include the GANTrack.h file and change the pagename for each new location.

Event method

Here is an example of an event that gets fired when the user presses a Save button.

-(IBAction) saveTheWorld:(id) sender{NSError*error; if(![[GANTracker sharedTracker] trackEvent:@"button_click"

http://618119.com/archives/2011/01/12/205.html

关于Android的nodpi,xhdpi,hdpi,mdpi,ldpi

作者:lizongbo 发表于:22:43. 星期三, 一月 12th, 2011

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明。

http://618119.com/archives/2011/01/12/205.html

关于Android的nodpi,xhdpi,hdpi,mdpi,ldpi

首先是几个基本概念:

1.屏幕尺寸Screen size

即显示屏幕的实际大小,按照屏幕的对角线进行测量。

为简单起见,Android把所有的屏幕大小分为四种尺寸:小,普通,大,超大(分别对应:small, normal, large, and extra large).

应用程序可以为这四种尺寸分别提供不同的自定义屏幕布局-平台将根据屏幕实际尺寸选择对应布局进行渲染,这种选择对于程序侧是透明的。

2.屏幕长宽比Aspect ratio

长宽比是屏幕的物理宽度与物理高度的比例关系。应用程序可以通过使用限定的资源来为指定的长宽比提供屏幕布局资源。

3.屏幕分辨率Resolution

在屏幕上显示的物理像素总和。需要注意的是:尽管分辨率通常用宽x高表示,但分辨率并不意味着具体的屏幕长宽比。

在Andorid系统中,应用程序不直接使用分辨率。

4.密度Density

根据像素分辨率,在屏幕指定物理宽高范围内能显示的像素数量。

在同样的宽高区域,低密度的显示屏能显示的像素较

相关资料

iPhone地图应用开发以及自定义Annotation

http://whaomian.wordpress.com/2011/09/25/31/

MKMAPVIEW上长按屏幕,添加大头针

http://www.cnblogs.com/peer/archive/2011/05/12/2044591.html

原理:

http://troybrant.net/blog/2010/01/mkmapview-and-zoom-levels-a-visual-guide/

设置缩放级别的代码:

http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/

// MKMapView+ZoomLevel.h

#import <MapKit/MapKit.h>

@interface MKMapView (ZoomLevel)

- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate

    zoomLevel:(NSUInteger)zoomLevel

    animated:(BOOL)animated;

@end

// MKMapView+ZoomLevel.m

#import "MKMapView+ZoomLevel.h"

#define MERCATOR_OFFSET 268435456

#define MERCATOR_RADIUS 85445659.44705395

@implementation MKMapView (ZoomLevel)

#pragma mark -

#pragma mark Map conversi

ASIHTTPRequest安装

http://www.cnblogs.com/dotey/archive/2011/05/10/2041966.html

http://www.dreamingwish.com/dream-2011/asihttprequest-use-download-cache.html

Getting Started with PhoneGap-Cordova and Xcode 4 

http://wiki.phonegap.com/w/page/52010495/Getting%20Started%20with%20PhoneGap-Cordova%20and%20Xcode%204

xcode4.2调试ios 5.1程序

http://www.cocoachina.com/bbs/read.php?tid=97441&page=1

http://blog.cnrainbird.com/index.php/2012/03/13/xcode4-2_zhong_diao_shi_ios5-1/

PhoneGap插件

http://www.phonegap.cn/?p=235

Apache Ant安装与配置

http://www.son1c.cn/show/268.html

Android中ListView分页加载数据

http://blog.csdn.net/cjjky/article/details/6898871

http://www.rexsee.com/CN/help.html

面孔网开源Android 应用“见面

http://t.cn/S7GqOH 

http://yilee.info/android-diy-listview.html

http://yajin167.info/2011/06/21/572.html

http://marshal.easymorse.com/archives/2662

http://plter.sinaapp.com/