摘要:
1、需要加入CoreLocation.framework,导入#import<CoreLocation/CoreLocation.h>2、在类中生命两个变量,并实现代理@interface ViewController () <CLLocationManagerDelegate>{ CLLocationManager * locationManager; CLLocationCoordinate2D curLocation;}3、定位的方法如下//获得自己的地理位置信息- (void) getCurrentLocation { //开始探测位置 if (locatio. 阅读全文
摘要:
UIImage *searchImg = [UIImage imageNamed:@"seach_top_bk"]; searchImg=[searchImg resizableImageWithCapInsets:UIEdgeInsetsMake(20, 20, 20, 20) resizingMode:UIImageResizingModeStretch];//拉伸背景图片 _searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(115, 7,200 , 30)]; _searchBar.backgro... 阅读全文