- 浏览: 318289 次
- 性别:
- 来自: 杭州
最新评论
-
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九宫格实现
文章列表
uitableview 初始化
- 博客分类:
- ios开发学习相关
#pragma mark - TableView Methods
//指定有多少个分区(Section),默认为1
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
//指定每个分区中有多少行,默认为1
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 5;
}
-(void)tableView:(UITableView *)t ...
ios 获取所有字体列表
- 博客分类:
- ios开发学习相关
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]];
NSArray *fontNames;
NSInteger indFamily, indFont;
for (indFamily=0; indFamily<[familyNames count]; ++indFamily)
{
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]);
...
//
// CustomSegmentedViewController.m
// CustomSegmented
//
// Created by qian cheng on 12-1-12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#import "CustomSegmentedViewController.h"
#import "CQSegmentControl.h"
@implementation CustomSegmentedViewController ...
tabbarItem 消息提示 self.tabBarItem.badgeValue=@"100";
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:5];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
//自定义tabBarController高度
self.tabBarController.tabBar.frame = CGRectMake(0, self.window.frame.size.height-44, 320, 44);
UIView * transitionView = [[self.tabBarController.view subviews] objectAtIndex:0];
/ ...
//隐藏键盘1
UITextViewDelegate
self.imageDesc.delegate = self;
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString*)text
{
if ([text isEqualToString:@"\n"]) {
[textView resignFirstResponder];
return NO;
}
return YE ...
coverFlow 图片点击事件
- 博客分类:
- ios开发学习相关
ViewController.h
//
// ViewController.h
// overFlow010
//
// Created by Bo Xiu on 12-9-15.
// Copyright (c) 2012年 Bo Xiu. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AFOpenFlowView.h"
@interface ViewController : UIViewController<AFOpenFlowViewDataSou ...
ios文本框随键盘提升
- 博客分类:
- ios开发学习相关
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController<UITextFieldDelegate>{
UIScrollView * _scrollView;
IBOutlet UITextField *message;
IBOutlet UIScrollView *myScrollView;
}
@property (retain, nonatomic) IBOutlet UITextField *message;
@property (retain, non ...
ios 显示气泡方法
- 博客分类:
- ios开发学习相关
#pragma mark Table view methods
- (UIView *)bubbleView:(NSString *)text from:(BOOL)fromSelf {
// build single chat bubble cell with given text
UIView *returnView = [[UIView alloc] initWithFrame:CGRectZero];
returnView.backgroundColor = [UIColor clearColor];
UIImage *bubble = [UIImage imageWi ...
UITextView 边框的设置
- 博客分类:
- ios开发学习相关
导入QuartzCote框架:
#import <QuartzCore/QuartzCore.h>
设置边框:
textView.layer.borderColor = [UIColorgrayColor].CGColor;
textView.layer.borderWidth =1.0;
textView.layer.cornerRadius =5.0;
uibutton 初始化
- 博客分类:
- ios开发学习相关
UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btn.frame = CGRectMake(30, 360, 90, 35);
//[btn setTitle:@"ZoomIn" forState:UIControlStateNormal];
//[btn setTitle:@"ZoomIn" forState:UIControlStateHighlighted];
[btn addTarget:self action:@selector ...
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle:@"资料"
style:UIBarButtonItemStylePlain
target:self
action:nil];
self.navigationItem.rightBarButtonItem = rightItem;
[rightItem release];
UITableCellViewController *cell;
static NSString *tableCellIdentifier = @"TableCellIdentifier";
cell = (UITableCellViewController *)[tableView dequeueReusableCellWithIdentifier:tableCellIdentifier];
if( cell == nil )
{
//cell = [[[UITableCellViewController all ...
UITableCellViewController.h
#import <UIKit/UIKit.h>
@interface UITableCellViewController : UITableViewCell
@property(nonatomic,retain) UILabel *lb_title;
@property(nonatomic,retain) UILabel *lb_date;
@property (nonatomic,retain) UILabel *lb_points;
@property(nonat ...
存:
//此处首先指定了图片存取路径(默认写到应用程序沙盒 中)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
//并给文件起个文件名
NSString *uniquePath=[[paths objectAtIndex:0] stringByAppendingPathComponent:@"pin.png"];
BOOL blHave=[[NSFileManager def ...