亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? buttonsviewcontroller.m

?? iphone開發
?? M
字號:
/*File: ButtonsViewController.mAbstract: The view controller for hosting the UIButton features of this sample.Version: 1.7Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.("Apple") in consideration of your agreement to the following terms, and youruse, installation, modification or redistribution of this Apple softwareconstitutes acceptance of these terms.  If you do not agree with these terms,please do not use, install, modify or redistribute this Apple software.In consideration of your agreement to abide by the following terms, and subjectto these terms, Apple grants you a personal, non-exclusive license, underApple's copyrights in this original Apple software (the "Apple Software"), touse, reproduce, modify and redistribute the Apple Software, with or withoutmodifications, in source and/or binary forms; provided that if you redistributethe Apple Software in its entirety and without modifications, you must retainthis notice and the following text and disclaimers in all such redistributionsof the Apple Software.Neither the name, trademarks, service marks or logos of Apple Inc. may be usedto endorse or promote products derived from the Apple Software without specificprior written permission from Apple.  Except as expressly stated in this notice,no other rights or licenses, express or implied, are granted by Apple herein,including but not limited to any patent rights that may be infringed by yourderivative works or by other works in which the Apple Software may beincorporated.The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NOWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR INCOMBINATION WITH YOUR PRODUCTS.IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTEGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/ORDISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OFCONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IFAPPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Copyright (C) 2008 Apple Inc. All Rights Reserved.*/#import "ButtonsViewController.h"#import "Constants.h"#import "DisplayCell.h"#import "SourceCell.h"@implementation ButtonsViewController@synthesize myTableView;enum ButtonTableSections{	kUIGrayButton_Section = 0,	kUIImageButton_Section,	kUIRoundRectButton_Section,	kUIDetailDisclosureButton_Section,	kUIInfoLightButton_Section,	kUIInfoDarkButton_Section,	kUIContactAddButton_Section};- (id)init{	self = [super init];	if (self)	{		// this title will appear in the navigation bar		self.title = NSLocalizedString(@"ButtonsTitle", @"");	}	return self;}- (void)dealloc{	[myTableView setDelegate:nil];	[myTableView release];		[grayButton release];	[imageButton release];	[roundedButtonType release];		[detailDisclosureButtonType release];	[infoLightButtonType release];	[infoDarkButtonType release];	[contactAddButtonType release];		[super dealloc];}+ (UIButton *)buttonWithTitle:	(NSString *)title								target:(id)target								selector:(SEL)selector								frame:(CGRect)frame								image:(UIImage *)image								imagePressed:(UIImage *)imagePressed								darkTextColor:(BOOL)darkTextColor{		UIButton *button = [[UIButton alloc] initWithFrame:frame];	// or you can do this:	//		UIButton *button = [[UIButton buttonWithType:UIButtonTypeCustom] retain];	//		button.frame = frame;		button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;	button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;		[button setTitle:title forState:UIControlStateNormal];		if (darkTextColor)	{		[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];	}	else	{		[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];	}		UIImage *newImage = [image stretchableImageWithLeftCapWidth:12.0 topCapHeight:0.0];	[button setBackgroundImage:newImage forState:UIControlStateNormal];		UIImage *newPressedImage = [imagePressed stretchableImageWithLeftCapWidth:12.0 topCapHeight:0.0];	[button setBackgroundImage:newPressedImage forState:UIControlStateHighlighted];		[button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside];	    // in case the parent view draws with a custom color or gradient, use a transparent color	button.backgroundColor = [UIColor clearColor];			return button;}#pragma mark#pragma mark Gray Button#pragma mark- (void)createGrayButton{		// create the UIButtons with various background images	// white button:	UIImage *buttonBackground = [UIImage imageNamed:@"whiteButton.png"];	UIImage *buttonBackgroundPressed = [UIImage imageNamed:@"blueButton.png"];		CGRect frame = CGRectMake(0.0, 0.0, kStdButtonWidth, kStdButtonHeight);		grayButton = [ButtonsViewController buttonWithTitle:@"Gray"								target:self								selector:@selector(action:)								frame:frame								image:buttonBackground								imagePressed:buttonBackgroundPressed								darkTextColor:YES];}#pragma mark#pragma mark Button with Image#pragma mark- (void)createImageButton{		// create a UIButton with just an image instead of a title		UIImage *buttonBackground = [UIImage imageNamed:@"whiteButton.png"];	UIImage *buttonBackgroundPressed = [UIImage imageNamed:@"blueButton.png"];		CGRect frame = CGRectMake(0.0, 0.0, kStdButtonWidth, kStdButtonHeight);		imageButton = [ButtonsViewController buttonWithTitle:@""								target:self								selector:@selector(action:)								frame:frame								image:buttonBackground								imagePressed:buttonBackgroundPressed								darkTextColor:YES];		[imageButton setImage:[UIImage imageNamed:@"UIButton_custom.png"] forState:UIControlStateNormal];}#pragma mark#pragma mark UIButtonTypeRoundedRect#pragma mark- (void)createRoundedButton{	// create a UIButton (UIButtonTypeRoundedRect)	roundedButtonType = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];	roundedButtonType.frame = CGRectMake(0.0, 0.0, kStdButtonWidth, kStdButtonHeight);	[roundedButtonType setTitle:@"Rounded" forState:UIControlStateNormal];	roundedButtonType.backgroundColor = [UIColor clearColor];	[roundedButtonType addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];}#pragma mark#pragma mark UIButtonTypeDetailDisclosure#pragma mark- (void)createDetailDisclosureButton{	// create a UIButton (UIButtonTypeDetailDisclosure)	detailDisclosureButtonType = [[UIButton buttonWithType:UIButtonTypeDetailDisclosure] retain];	detailDisclosureButtonType.frame = CGRectMake(0.0, 0.0, 25.0, 25.0);	[detailDisclosureButtonType setTitle:@"Detail Disclosure" forState:UIControlStateNormal];	detailDisclosureButtonType.backgroundColor = [UIColor clearColor];	[detailDisclosureButtonType addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];}#pragma mark#pragma mark UIButtonTypeInfoDark#pragma mark- (void)createInfoDarkButton{	// create a UIButton (UIButtonTypeInfoLight)	infoDarkButtonType = [[UIButton buttonWithType:UIButtonTypeInfoDark] retain];	infoDarkButtonType.frame = CGRectMake(0.0, 0.0, 25.0, 25.0);	[infoDarkButtonType setTitle:@"Detail Disclosure" forState:UIControlStateNormal];	infoDarkButtonType.backgroundColor = [UIColor clearColor];	[infoDarkButtonType addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];}#pragma mark#pragma mark UIButtonTypeInfoLight#pragma mark- (void)createInfoLightButton{	// create a UIButton (UIButtonTypeInfoLight)	infoLightButtonType = [[UIButton buttonWithType:UIButtonTypeInfoLight] retain];	infoLightButtonType.frame = CGRectMake(0.0, 0.0, 25.0, 25.0);	[infoLightButtonType setTitle:@"Detail Disclosure" forState:UIControlStateNormal];	infoLightButtonType.backgroundColor = [UIColor clearColor];	[infoLightButtonType addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];	infoLightButtonType.backgroundColor = [UIColor grayColor];}#pragma mark#pragma mark UIButtonTypeContactAdd#pragma mark- (void)createContactAddButton{	// create a UIButton (UIButtonTypeContactAdd)	contactAddButtonType = [[UIButton buttonWithType:UIButtonTypeContactAdd] retain];	contactAddButtonType.frame = CGRectMake(0.0, 0.0, 25.0, 25.0);	[contactAddButtonType setTitle:@"Detail Disclosure" forState:UIControlStateNormal];	contactAddButtonType.backgroundColor = [UIColor clearColor];	[contactAddButtonType addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];}- (void)action:(id)sender{	NSLog(@"UIButton was clicked");}- (void)loadView{	// create and configure the table view	myTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStyleGrouped];		myTableView.delegate = self;	myTableView.dataSource = self;	myTableView.autoresizesSubviews = YES;	self.view = myTableView;		// create all our UIButtons to be used in myTableView	[self createGrayButton];	[self createImageButton];	[self createRoundedButton];		[self createDetailDisclosureButton];	[self createInfoLightButton];	[self createInfoDarkButton];	[self createContactAddButton];}#pragma mark - UITableView delegates// if you want the entire table to just be re-orderable then just return UITableViewCellEditingStyleNone//- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{	return UITableViewCellEditingStyleNone;}- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{	return 7;}- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{	NSString *title;	switch (section)	{		case kUIGrayButton_Section:		{			title = @"UIButton";			break;		}		case kUIImageButton_Section:		{			title = @"UIButton";			break;		}		case kUIRoundRectButton_Section:		{			title = @"UIButtonTypeRoundedRect";			break;		}		case kUIDetailDisclosureButton_Section:		{			title = @"UIButtonTypeDetailDisclosure";			break;		}		case kUIInfoLightButton_Section:		{			title = @"UIButtonTypeInfoLight";			break;		}		case kUIInfoDarkButton_Section:		{			title = @"UIButtonTypeInfoDark";			break;		}		case kUIContactAddButton_Section:		{			title = @"UIButtonTypeContactAdd";			break;		}	}	return title;}- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{	return 2;}// to determine specific row height for each cell, override this.  In this example, each row is determined// buy the its subviews that are embedded.//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{	CGFloat result;		switch ([indexPath row])	{		case 0:		{			result = kUIRowHeight;			break;		}		case 1:		{			result = kUIRowLabelHeight;			break;		}	}	return result;}// utility routine leveraged by 'cellForRowAtIndexPath' to determine which UITableViewCell to be used on a given row//- (UITableViewCell *)obtainTableCellForRow:(NSInteger)row{	UITableViewCell *cell = nil;	if (row == 0)		cell = [myTableView dequeueReusableCellWithIdentifier:kDisplayCell_ID];	else if (row == 1)		cell = [myTableView dequeueReusableCellWithIdentifier:kSourceCell_ID];		if (cell == nil)	{		if (row == 0)			cell = [[[DisplayCell alloc] initWithFrame:CGRectZero reuseIdentifier:kDisplayCell_ID] autorelease];		else if (row == 1)			cell = [[[SourceCell alloc] initWithFrame:CGRectZero reuseIdentifier:kSourceCell_ID] autorelease];	}		return cell;}// to determine which UITableViewCell to be used on a given row.//- (UITableViewCell *)tableView:(UITableView *)tableView 								cellForRowAtIndexPath:(NSIndexPath *)indexPath{	NSInteger row = [indexPath row];		UITableViewCell *cell = [self obtainTableCellForRow:row];		switch (indexPath.section)	{		case kUIGrayButton_Section:		{			if (row == 0)			{				// this cell hosts the gray button				((DisplayCell *)cell).nameLabel.text = @"Background Image";				((DisplayCell *)cell).view = grayButton;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createGrayButton";			}			break;		}				case kUIImageButton_Section:		{			if (row == 0)			{				// this cell hosts the button with image				((DisplayCell *)cell).nameLabel.text = @"Button with Image";				((DisplayCell *)cell).view = imageButton;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createImageButton";			}			break;		}				case kUIRoundRectButton_Section:		{			if (row == 0)			{				// this cell hosts the rounded button				((DisplayCell *)cell).nameLabel.text = @"Rounded Button";				((DisplayCell *)cell).view = roundedButtonType;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createRoundedButton";			}			break;		}		case kUIDetailDisclosureButton_Section:		{			if (row == 0)			{				// this cell hosts the rounded button				((DisplayCell *)cell).nameLabel.text = @"Detail Disclosure";				((DisplayCell *)cell).view = detailDisclosureButtonType;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createDetailDisclosureButton";			}			break;		}					case kUIInfoLightButton_Section:		{			if (row == 0)			{				// this cell hosts the rounded button				((DisplayCell *)cell).nameLabel.text = @"Info Light";				((DisplayCell *)cell).view = infoLightButtonType;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createInfoLightButton";			}			break;		}				case kUIInfoDarkButton_Section:		{			if (row == 0)			{				// this cell hosts the rounded button				((DisplayCell *)cell).nameLabel.text = @"Info Dark";				((DisplayCell *)cell).view = infoDarkButtonType;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createInfoDarkButton";			}			break;		}					case kUIContactAddButton_Section:		{			if (row == 0)			{				// this cell hosts the rounded button				((DisplayCell *)cell).nameLabel.text = @"Contact Add";				((DisplayCell *)cell).view = contactAddButtonType;			}			else			{				// this cell hosts the info on where to find the code				((SourceCell *)cell).sourceLabel.text = @"ButtonsViewController.m - createContactAddButton";			}			break;		}			}		return cell;}@end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人www| 亚洲男同性视频| 国产精品12区| 国产午夜亚洲精品理论片色戒| 国产精品77777| 国产精品久久毛片av大全日韩| 色综合天天综合色综合av| ●精品国产综合乱码久久久久| 色吧成人激情小说| 视频一区视频二区在线观看| 欧美一区二区三区四区在线观看 | 欧美va亚洲va香蕉在线| 国产麻豆精品在线| 中文字幕日韩精品一区| 欧美图区在线视频| 日本不卡一二三区黄网| 久久免费的精品国产v∧| 成人av片在线观看| 樱花影视一区二区| 欧美一区二区三区在线| 丁香激情综合国产| 亚洲午夜在线视频| 欧美sm美女调教| 99免费精品在线| 丝袜亚洲另类欧美| 国产日本一区二区| 在线看不卡av| 精品午夜一区二区三区在线观看| 精品久久久久久综合日本欧美| 成人av片在线观看| 视频一区二区国产| 欧美激情艳妇裸体舞| 在线观看中文字幕不卡| 加勒比av一区二区| 日韩美女视频一区二区| 欧美电影在线免费观看| 东方欧美亚洲色图在线| 丝袜亚洲另类欧美| 国产精品看片你懂得 | jlzzjlzz欧美大全| 视频一区在线视频| 中文字幕在线不卡国产视频| 91精品久久久久久久99蜜桃| 成人性生交大片免费看中文网站| 亚洲成人免费av| 国产欧美日韩三区| 欧美精品在线一区二区| 不卡av电影在线播放| 日韩二区三区在线观看| 国产精品丝袜91| 欧美一区二区高清| 99国内精品久久| 黄网站免费久久| 亚洲电影一级片| 亚洲国产精品国自产拍av| 欧美日韩成人激情| 不卡的av电影在线观看| 精品一区二区三区影院在线午夜 | 婷婷亚洲久悠悠色悠在线播放| 日本一区二区在线不卡| 91精品国产色综合久久久蜜香臀| 99久久99久久久精品齐齐| 另类综合日韩欧美亚洲| 亚洲一区二区在线播放相泽| 国产日产欧产精品推荐色| 欧美日韩成人综合| 91在线免费播放| 国产精品亚洲人在线观看| 丝袜美腿亚洲综合| 亚洲精品第1页| 国产精品天美传媒沈樵| 精品入口麻豆88视频| 欧美日韩成人综合天天影院| 91色九色蝌蚪| 高清成人免费视频| 国内精品久久久久影院薰衣草 | 欧美色电影在线| 成人综合在线视频| 激情都市一区二区| 日韩精品一二区| 亚洲一区二区三区影院| 自拍偷在线精品自拍偷无码专区| 久久九九影视网| 日韩一级片在线观看| 欧美私模裸体表演在线观看| youjizz国产精品| 国产精品69久久久久水密桃 | 久久99久久精品| 日韩国产精品久久久久久亚洲| 亚洲一区二区三区四区五区黄| 中文字幕在线视频一区| 欧美经典三级视频一区二区三区| 日韩欧美一级二级三级久久久| 欧美日韩国产在线播放网站| 欧美无人高清视频在线观看| 色悠久久久久综合欧美99| 丁香六月久久综合狠狠色| 粗大黑人巨茎大战欧美成人| 国产成人高清视频| 国产成人99久久亚洲综合精品| 国产一区二区三区电影在线观看 | 久久精品男人的天堂| 精品久久99ma| 日韩欧美第一区| 日韩欧美精品三级| 欧美一区二区在线观看| 欧美一区二区免费| 欧美成人女星排行榜| 精品毛片乱码1区2区3区| 欧美mv日韩mv亚洲| 久久综合视频网| 国产偷国产偷精品高清尤物| 国产三级精品在线| 国产精品区一区二区三区| 中文字幕亚洲不卡| 亚洲欧美日韩人成在线播放| 亚洲精品亚洲人成人网| 一区二区三区久久| 性做久久久久久久免费看| 日韩和的一区二区| 久久精品国产秦先生| 激情六月婷婷久久| 成人综合婷婷国产精品久久免费| 99视频超级精品| 99re这里只有精品6| 91久久免费观看| 欧美男人的天堂一二区| 日韩欧美一二区| 久久久久久久久久久久久久久99| 国产精品无码永久免费888| 中文字幕一区二区三| 一区二区三区欧美在线观看| 亚洲国产精品久久人人爱| 蜜臀久久久99精品久久久久久| 卡一卡二国产精品| 国产99久久久精品| 97国产一区二区| 欧美日韩一区二区三区高清| 7777精品伊人久久久大香线蕉完整版 | 亚洲视频在线一区二区| 亚洲国产人成综合网站| 久久精品国产精品亚洲红杏| 国产精品自拍一区| 色综合婷婷久久| 欧美一区二区三区免费| 国产日韩欧美精品综合| 亚洲日本在线观看| 日韩高清在线电影| 国产黄色91视频| 91福利资源站| 日韩欧美在线一区二区三区| 国产欧美一区二区精品性| 亚洲精品视频一区| 日本va欧美va精品| 成人网在线免费视频| 99精品久久只有精品| 欧美一区二区观看视频| 中文字幕第一区综合| 亚洲电影欧美电影有声小说| 国产一区二区成人久久免费影院| 99国产精品久| 欧美不卡激情三级在线观看| 日韩理论在线观看| 久久综合综合久久综合| av在线不卡免费看| 欧美日韩激情一区| 国产欧美精品一区aⅴ影院 | 亚洲免费色视频| 久久精品国内一区二区三区| 99久久伊人精品| 日韩一级免费观看| 亚洲欧美电影一区二区| 精品午夜久久福利影院| 色香蕉成人二区免费| 久久综合久久鬼色中文字| 夜夜精品视频一区二区| 国产综合成人久久大片91| 在线视频国内自拍亚洲视频| 久久九九久久九九| 首页亚洲欧美制服丝腿| 国产凹凸在线观看一区二区| 这里只有精品99re| 亚洲天堂福利av| 国产在线国偷精品免费看| 欧美日韩在线一区二区| 国产精品色在线| 久久成人综合网| 欧美三级电影精品| 中文字幕精品—区二区四季| 免费成人你懂的| 91成人免费电影| 中文一区在线播放| 久久精品99国产国产精| 欧美性猛片xxxx免费看久爱| 国产精品福利电影一区二区三区四区| 美女看a上一区| 欧美日韩一区精品| 亚洲人成在线播放网站岛国 | 成人v精品蜜桃久久一区| 日韩欧美综合在线|