iphone 代码片段2

  Iphone代码片段导航

 Iphone开发代码片段1

Iphone开发代码片段2

 Iphone开发代码片段3

1.

如果您想在应用里添加提示功能,比如让 iPhone 机身震动,可以使用下面这行代码:
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); 

 

2.

UItextView设置圆角 

#import <QuartzCore/QuartzCore.h>


layer

UITextView.layer.cornerRadius = 6;

UITextView.layer.masksToBounds = YES;

角度可以自己调

 3.viewdidunload在内存发生警告的时候,会调用,当调回来的时候,就会继续执行viewdidload方法。

4.iphone  set table scroll postion

    [tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
[tableView reloadData];
原文地址:https://www.cnblogs.com/likwo/p/1830788.html