iOS进阶

iOS 基础UI总结

2016-08-05  本文已影响52人  Jack__yang

基本控件

UIView

UILabel

UIButton

UIImageView

UITextField

代理方法:

-(BOOL)textFieldShouldReturn:(UITextField *)textField

-(void)textFieldDidEndEditing:(UITextField *)textField

-(void)textFieldDidBeginEditing:(UITextField *)textField

-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField

-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string

UITextView

-(BOOL)textViewShouldBeginEditing:(UITextView *)textView

-(BOOL)textViewShouldEndEditing:(UITextView *)textView

-(void)textViewDidBeginEditing:(UITextView *)textView

-(void)textViewDidEndEditing:(UITextView *)textView

-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text

-(void)textViewDidChange:(UITextView *)textView

-(void)textViewDidChangeSelection:(UITextView *)textView

-(BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange

UIScrollView

-(void)scrollViewDidScroll:(UIScrollView *)scrollView

-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView

-(void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset

// decelerate: 告诉你是否要减速

-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate

-(void)scrollViewDidScrollToTop:(UIScrollView *)scrollView

-(void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView

-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView

UITableView

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

-(NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section

-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath


传值

正向传值

逆向传值

Block

Delagate

Notification

控制器的展现方式

模态

UINavigationController

UITabBarController

上一篇下一篇

猜你喜欢

热点阅读