Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit/UIKit-2380.17/UITableViewRowData.m:400
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:'Failed to allocate data stores for 997008923 rows in section 0. Consider using fewer rows'
Run Code Online (Sandbox Code Playgroud)
我的代码
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [appDelegate.purchaseArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
return cell;
}
-(void)viewWillAppear:(BOOL)animated
{ …Run Code Online (Sandbox Code Playgroud) 我想将相机设置在当前位置,并将缩放级别设置为10.所以我编写了这样的代码,对于当前位置,我从这篇文章中得到提示.
这是我的代码
mapView_=[[GMSMapView alloc]initWithFrame:CGRectZero];
CLLocationCoordinate2D currentPosition = mapView_.myLocation.coordinate;
GMSCameraPosition* camera =
[GMSCameraPosition cameraWithTarget: currentPosition zoom: 10];
mapView_.camera = camera;
mapView_.delegate=self;
mapView_.mapType = kGMSTypeSatellite;
mapView_.myLocationEnabled = YES;
self.view = mapView_;
mapView_.settings.myLocationButton = YES;
Run Code Online (Sandbox Code Playgroud)
但设备中的坐标为0.00.
请问任何可以帮助解决这个问题?