亚洲一区综合在线播放,中文字幕精品三区无码亚洲,78成人精品电影在线播放日韩精品电影一区亚洲 http://www.tkk7.com/zl4393753/category/46553.htmljust do itzh-cnThu, 14 Oct 2010 02:35:06 GMTThu, 14 Oct 2010 02:35:06 GMT60創建自定義返回按鈕http://www.tkk7.com/zl4393753/archive/2010/10/13/335069.htmlNeil's NoteBookNeil's NoteBookWed, 13 Oct 2010 14:14:00 GMThttp://www.tkk7.com/zl4393753/archive/2010/10/13/335069.htmlhttp://www.tkk7.com/zl4393753/comments/335069.htmlhttp://www.tkk7.com/zl4393753/archive/2010/10/13/335069.html#Feedback0http://www.tkk7.com/zl4393753/comments/commentRss/335069.htmlhttp://www.tkk7.com/zl4393753/services/trackbacks/335069.html
UIBarButtonItem *backButton = [[[UIBarButtonItem alloc] initWithTitle:@"my back button" style:UIBarButtonItemStyleBordered target:nil action:nil] autorelease]; 
self.navigationItem.leftBarButtonItem = backButton;


Neil's NoteBook 2010-10-13 22:14 發表評論
]]>
Iphone 修改默認返回的名稱http://www.tkk7.com/zl4393753/archive/2010/10/06/333848.htmlNeil's NoteBookNeil's NoteBookWed, 06 Oct 2010 13:50:00 GMThttp://www.tkk7.com/zl4393753/archive/2010/10/06/333848.htmlhttp://www.tkk7.com/zl4393753/comments/333848.htmlhttp://www.tkk7.com/zl4393753/archive/2010/10/06/333848.html#Feedback0http://www.tkk7.com/zl4393753/comments/commentRss/333848.htmlhttp://www.tkk7.com/zl4393753/services/trackbacks/333848.html

Iphone默認返回按鈕的文字是前一個view的title,

如果需要修改默認的返回名稱,需要在前一個頁面的viewDidLoad事件中進行設置:

 UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStylePlain target:nil action:nil];

self.navigationItem.backBarButtonItem = backButton;
[backButton release];


Neil's NoteBook 2010-10-06 21:50 發表評論
]]>
Iphone 帶NavigationBar的ModalViewhttp://www.tkk7.com/zl4393753/archive/2010/10/06/333832.htmlNeil's NoteBookNeil's NoteBookWed, 06 Oct 2010 10:16:00 GMThttp://www.tkk7.com/zl4393753/archive/2010/10/06/333832.htmlhttp://www.tkk7.com/zl4393753/comments/333832.htmlhttp://www.tkk7.com/zl4393753/archive/2010/10/06/333832.html#Feedback0http://www.tkk7.com/zl4393753/comments/commentRss/333832.htmlhttp://www.tkk7.com/zl4393753/services/trackbacks/333832.html 悲劇的thinkpad。。。所以不能截圖。。。稀爛!
1. 創建一個viewcontroller,比如SettingViewController,同時創建實現文件和頭文件,不多說
2. 創建該viewcontroller對應的view文件,比如SettingView.xib,沒什么好說的
3. 雙擊剛才創建的xib文件,指定class為第一步創建的viewcontroller,在interface builder中將view和file owner連接起來
4. 在創建的SettingViewController.h文件中定義一個bool類型的變量,該變量用來指示modal view是否已彈出,代碼如下:

@interface SettingViewController : UIViewController {

BOOL isPushedView;

}

@property (nonatomic, readwrite) BOOL isPushedView;

5. 在SettingViewController.m文件中添加具體實現代碼,如下:

@implementation SettingViewController

@synthesize isPushedView;

- (void)viewDidLoad {

    [super viewDidLoad];

    if(isPushedView == NO) {

        self.navigationItem.title = @"設置";

        self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

        self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self     action:@selector(cancel_Clicked:)] autorelease];

    }

}


-(void) cancel_Clicked:(id)sender {    

    [self.navigationController dismissModalViewControllerAnimated:YES];     

}


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

    // Return YES for supported orientations

    return (interfaceOrientation == UIInterfaceOrientationPortrait);

}

6. 在RootViewController.h文件中定義變量,代碼如下:

@class SettingViewController;

@interface RootViewController : UITableViewController {

SettingViewController *settingViewController;

UINavigationController *settingNavController;

}

7. 在RootViewController.m文件中添加實現代碼,如下:

- (void) settingClicked {  

if(settingViewController == nil) {

settingViewController = [[SettingViewController alloc] initWithNibName:@"SettingView" bundle:[NSBundle mainBundle]];

settingViewController.isPushedView = NO;

}

    if(settingNavController == nil) {

        settingNavController = [[UINavigationController alloc] initWithRootViewController:settingViewController];

[self.navigationController presentModalViewController:settingNavController animated:YES];  

}

}

8. DONE!!!



Neil's NoteBook 2010-10-06 18:16 發表評論
]]>
Iphone 不同頁面間跳轉http://www.tkk7.com/zl4393753/archive/2010/10/06/333828.htmlNeil's NoteBookNeil's NoteBookWed, 06 Oct 2010 08:34:00 GMThttp://www.tkk7.com/zl4393753/archive/2010/10/06/333828.htmlhttp://www.tkk7.com/zl4393753/comments/333828.htmlhttp://www.tkk7.com/zl4393753/archive/2010/10/06/333828.html#Feedback0http://www.tkk7.com/zl4393753/comments/commentRss/333828.htmlhttp://www.tkk7.com/zl4393753/services/trackbacks/333828.html 2. 創建一個view,比如 NewOrderView.xib
3. 雙擊打開NewOrderView.xib,指定其class為 NewOrderViewController,并在 Interface Builder中將view與File Owner連接起來
4. 在RootViewController.h文件中定義 NewOrderViewController, 設置其為屬性,代碼如下:

@class NewOrderViewController;

@interface RootViewController : UITableViewController {

NewOrderViewController *newOrderViewController;

}

@property (nonatomic, retain) NewOrderViewController *newOrderViewController;

5. 在RootViewController.m文件中實現跳轉,代碼如下:
//添加按鈕

- (void)viewDidLoad {

    [super viewDidLoad];


    self.navigationItem.title = @"訂單列表";

    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

    UIBarButtonItem *buttonEdit = [[[UIBarButtonItem alloc] initWithTitle:@"編輯" style:UIBarButtonItemStyleBordered target:self            action:@selector(editCharacters)] autorelease];

    UIBarButtonItem *buttonAdd = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showNewOrderView)] autorelease];

    self.navigationItem.leftBarButtonItem=buttonEdit;

    self.navigationItem.rightBarButtonItem=buttonAdd;

//實現跳轉

- (void) showNewOrderView {

    if (self.newOrderViewController == nil) {

        NewOrderViewController *newOrder = [[NewOrderViewController alloc] initWithNibName:@"NewOrderView" bundle:nil];

        self.newOrderViewController = newOrder;

        [newOrder release];

    }

    [self.navigationController pushViewController:self.newOrderViewController animated:YES];



Neil's NoteBook 2010-10-06 16:34 發表評論
]]>
Iphone開發 可編輯表格http://www.tkk7.com/zl4393753/archive/2010/10/04/333730.htmlNeil's NoteBookNeil's NoteBookMon, 04 Oct 2010 07:53:00 GMThttp://www.tkk7.com/zl4393753/archive/2010/10/04/333730.htmlhttp://www.tkk7.com/zl4393753/comments/333730.htmlhttp://www.tkk7.com/zl4393753/archive/2010/10/04/333730.html#Feedback0http://www.tkk7.com/zl4393753/comments/commentRss/333730.htmlhttp://www.tkk7.com/zl4393753/services/trackbacks/333730.html

In some of the iPhone's default apps, you may find that you can "edit" a table, then have little red minus signs appear to the left of the table, giving you the option to delete those rows. So, how do you do that in your own programs?

The answers, it turns out, is a very simple one:

[self.tableView setEditing:YES animated:YES];

That's literally all you need to do to set up those deletion marks. Then you just need to respond to tableView:commitEditingStyle: forRowAtIndexPath:.

However, there are some nuances, particularly the questions of how you start up a table's editing and how you end it, and I'm going to show some real-world examples of those methods over the course of this article ...

An Actual Example

The program that I've showed off elsewhere in this series makes uses of a tableView's editing functionality by allowing the user to delete characters from the app, each of whom are represented by a table row

First, you need to set up some way to activate the functionality:

- (void)editCharacters {
    [self.tableView setEditing:YES animated:YES];
    UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]
        initWithBarButtonSystemItem:UIBarButtonSystemItemDone
                                           target:self
                                           action:@selector(endTableEditing)];
    self.navigationItem.leftBarButtonItem = doneButton;
    [doneButton release];

    self.navigationItem.rightBarButtonItem = nil;
}

This method is triggered when a user selects an "Edit" button. You'll note that besides starting the editing, I also change around the button in my navbar. That's because when a user is editing I no longer need an "Edit" button, but instead require a "Done" button. You might alternatively set buttons' enabled properties to NO ... but in any case, you always need to give users a way to get out of editing mode.

Your tableView: method will probably delete the table item from your table and/or the data store that it originates from:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

    if (editingStyle == UITableViewCellEditingStyleDelete) {
        [self recordWasDeleted:indexPath.row];
    }
}

For completeness state, I'll also include the method call generated when the "Done" button is clicked:

- (void)endTableEditing {
    [self.tableView setEditing:NO animated:YES];
    [self updateButtons];
}

This is pretty much the opposite of my editCharacters method: the editing is turned back off, then the buttons are returned to their original state.

And that's really all you need to do to edit a table: turn editing on, respond to the deletion message, and turn it back off at the end.

Doing More with Table Edits

You do have some other editing possibilities that I'm not going to cover in depth in this article. Most notably, you can adjust the editingStyle property of any individual cell. Apple claims it's set to UITableViewCellEditingStyleNone by default, but it sure looks to me like it's set to UITableViewCellEditingStyleDelete, which is what shows those handsome red minus marks. If you instead want to insert rows, you can set it to UITableViewCellEditingStyleInsert, and then do the appropriate thing when tableView:commitEditingStyle:forRowAtIndexPath: receives input of type insert.

That's it for me and tables for the nonce. If there's any other topics that you'd like covered regarding them, let me know in the comments. In the meantime, I'm planning to next return to my splashView topic, as some folks have requested in comments.



Neil's NoteBook 2010-10-04 15:53 發表評論
]]>
主站蜘蛛池模板: 亚洲国产日韩视频观看| 免费国产va视频永久在线观看| 亚洲人成网www| 亚洲日韩精品无码专区加勒比 | 亚洲精品成a人在线观看| 亚洲AV日韩精品久久久久久| 亚洲一区二区三区写真| 免费人成激情视频在线观看冫 | 亚洲国产视频网站| 国产免费AV片在线观看播放| 无码高潮少妇毛多水多水免费| 亚洲精品国产精品乱码不99| 亚洲a∨国产av综合av下载 | 国产亚洲精aa成人网站| 亚洲日本一线产区和二线产区对比| 日本三级2019在线观看免费| 香蕉蕉亚亚洲aav综合| 99热这里只有精品6免费| 亚洲自偷自偷在线制服| 美女视频黄频a免费观看| 欧美男同gv免费网站观看| 亚洲国产综合精品中文第一区| 免费国产黄网站在线观看| 亚洲入口无毒网址你懂的| 精品无码人妻一区二区免费蜜桃 | 一级毛片免费播放视频| 免费无码黄动漫在线观看| 亚洲欧洲精品一区二区三区| 国产成人精品免费视频大全| 四虎影视大全免费入口| 亚洲卡一卡2卡三卡4麻豆| 免费A级毛片无码视频| 激情综合亚洲色婷婷五月 | 国产美女a做受大片免费| 亚洲综合av一区二区三区不卡| 日产乱码一卡二卡三免费| 亚洲国产一区二区三区在线观看| 一本无码人妻在中文字幕免费| 亚洲jjzzjjzz在线播放| 亚洲中文字幕无码专区| 91av免费在线视频|