请注意:我知道在类似的行上有很多例子.我正在寻找最基本的解决方案,只需要最少的设置.
我试图自己创造一个,我知道我离开了..
#import "ViewController.h"
@interface ViewController () <UITableViewDataSource, UITableViewDelegate>
@property(strong, nonatomic) UITableView *tableView;
@property(strong, nonatomic) NSMutableArray *dataArray;
@property (strong, nonatomic) UITableViewCell *customCell;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStylePlain];
[self.tableView setDataSource:self];
[self.tableView setDelegate:self];
[self.tableView setShowsVerticalScrollIndicator:NO];
self.tableView.translatesAutoresizingMaskIntoConstraints = NO;
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self.view addSubview:self.tableView];
self.dataArray = [@[@"For the past 33 years, I have looked in the mirror every …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中通过pod使用Google Maps SDK for iOS版本:1.10.17867.0.但是当我在特定位置初始化地图时,所有标题和地图都会开始闪烁.示例代码(swift):
import UIKit
import GoogleMaps
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.whiteColor();
var camera = GMSCameraPosition.cameraWithLatitude(19.0176147, longitude: 72.8561644, zoom:18)
// even try this: 28.6469655, longitude: 77.0932634, zoom:10
var mapView = GMSMapView.mapWithFrame(CGRectZero, camera:camera)
var marker = GMSMarker()
marker.position = camera.target
marker.snippet = "Hello World"
marker.appearAnimation = kGMSMarkerAnimationPop
marker.map = mapView
self.view = mapView
}
}
Run Code Online (Sandbox Code Playgroud)