- 浏览: 318182 次
- 性别:
- 来自: 杭州
最新评论
-
atgoingguoat:
R.drawable.icon是LOG图
android九宫格实现 -
atgoingguoat:
android:src="@drawable/ico ...
android九宫格实现 -
修博龙泉:
旋转view:
CGAffineTransform at ...
动画-图片旋转 -
修博龙泉:
阻尼效果图片:
CALayer *layer = self.i ...
动画-图片旋转 -
bei-jin-520:
color]sdfsdfsdf
android九宫格实现
文章列表
/**
格式化时间
timeSeconds 为0时表示当前时间,可以传入你定义的时间戳
timeFormatStr为空返回当当时间戳,不为空返回你写的时间格式(yyyy-MM-dd HH:ii:ss)
setTimeZome ([NSTimeZone systemTimeZone]获得当前时区字符串)
*/
-(NSString *)setTimeInt:(NSTimeInterval)timeSeconds setTimeFormat:(NSString *)timeFormatStr setTimeZome:(NSString *)timeZoneStr{
...
.h
[[NSNotificationCenter defaultCenter] postNotificationName:@"wantuNewMessage" object:@"10"];
.m
- (void)viewDidAppear:(BOOL)animated{
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selec ...
ios自定义BadgeValue
- 博客分类:
- ios开发学习相关
//
// ViewController.m
// Badge
//
// Created by Bo Xiu on 12-10-23.
// Copyright (c) 2012年 Bo Xiu. All rights reserved.
//
#import "ViewController.h"
#import "JSBadgeView.h"
#import <QuartzCore/QuartzCore.h>
#define kViewBackgroundColor [UIColor colorWithR ...
自定义uitarbarItem
- 博客分类:
- ios开发学习相关
-(void)viewDidAppear:(BOOL)animated{
[self showBadgeValue:@"10"];
}
- (void)showBadgeValue:(NSString *)strBadgeValue
{
UITabBar *tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0 ...
plist使用的若干问题
弄了半天的plist,最无语的莫过于plist还分种类的。有字典型和数组型等。
plist的写入是,你把你放在工程中的plist删掉。你要写入plist的时候,
如果发现没有该plist,其会帮新建该plist。别傻傻的认为自己建立一个plist,然后
运行程序的时候他会在你建的那plist里面多出几行数据,因为你修改的是应用中的
plist而非你本地的那个plist。
下面的plist里面存放这的是array数组
以下是显示plist的代码:
NSArray *paths1=NSSearchPathForDirectoriesInDomains(NSDocumen ...
NSUserDefaults的使用
创建一个user defaults方法有多个,最简单得快速创建方法:
NSUserDefaults *accountDefaults = [NSUserDefaults standardUserDefaults];
添加数据到 user defaults:
[accountDefaults setObject:nameField.text forKey:UserDefaultNameKey];
也可以添加基本数据类型int, float, bool等,有相应得方法
[accountDefaults setBool:YES forKey: ...
NSTimer *timer = [[[NSTimer alloc]init]autorelease];
timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(function:) userInfo:nil repeats:YES];
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
if ...
openssl pkcs12 -clcerts -nokeys -out cert.pem -in aps_development.p12
openssl pkcs12 -nocerts -out key.pem -in aps_development.p12
openssl rsa -in key.pem -out key.unencrypted.pem
cat cert.pem key.unencrypted.pem > iostest_push_dev.pems
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html
appdelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
application.applic ...
[IOS]NSTimer启动与停止 (2012-02-03 14:49:06)转载▼
标签: 杂谈 分类: Code
timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(function:) userInfo:nil repeats:NO];
timer运行一次就会自动停下
timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(function:) userInfo: ...
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>
-(void)viewDidAppear:(BOOL)animated{
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef results = ABAddressBookCopyArrayOfAllPeople(addressBook);
for(int i = 0; i < ...
uitableview 上提下拉刷新
- 博客分类:
- ios开发学习相关
#import <UIKit/UIKit.h>
#import "PullToRefreshTableView.h"
@interface ChyoViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>{
PullToRefreshTableView * tableView;
NSMutableArray * array; // 数据源
}
@property (nonatomic ...
uitableview 上下滚动
- 博客分类:
- ios开发学习相关
table = [[PullToRefreshTableView alloc] initWithFrame:CGRectMake(0, 45, 320, 480)];
[table setContentSize:CGSizeMake(320, 960)];
//table.contentSize = CGRectMake(0, 0, 320, 960);
table.delegate = self;
table.dataSource = self;
table.backgroundColor = [UIColor clearColor];
...
1:系统工具-》共享-》开启个人文件夹
2: cp /etc/php.ini.default /etc/php.ini
3: sudo vi /etc/apache2/httpd.conf xxxlibphpxxx 前面#注释掉,开启apache 中的php服务
4:suod apachectl restart
5: 在网站文件夹下建立.php 配置结束