In xcode 9 with iOS 11 - issue with loading of Map tiles on first run

前端 未结 4 2100
孤城傲影
孤城傲影 2021-02-13 12:53

--Updated with new findings -- Tested in both simulator and on device. Maps are not loaded correctly when the app is run from a cold start. Tiles are not being displayed.

<
4条回答
  •  你的背包
    2021-02-13 13:40

    I Think you should try By removing

    - (void)viewDidLayoutSubviews
    {
        [super viewDidLayoutSubviews];
    
    }
    

    and Putting following code into your View Didload Method

        CGFloat edge = 10.0f;
    
        UIImage *gotoUserLocationButtonImage = self.gotoUserLocationButton.imageView.image;
        self.gotoUserLocationButton.frame = CGRectMake(edge, edge + self.statusBarHeight, gotoUserLocationButtonImage.size.width, gotoUserLocationButtonImage.size.height);
    
        UIImage *getDirectionsButtonImage = self.getDirectionsButton.imageView.image;
        [self.getDirectionsButton setFrame:CGRectMake(CGRectGetMaxX(self.gotoUserLocationButton.frame), edge + self.statusBarHeight, getDirectionsButtonImage.size.width, getDirectionsButtonImage.size.height)];
    

提交回复
热议问题