Post

Replies

Boosts

Views

Activity

MKMapView as UITableViewCell not accessible
I'm embedding a MKMapView in a UITableViewCell which works quite well. Unfortunately, the map can not be used e.g. zoomed, scrolled or tapped. Even the legal link from Apple is not tappable. Any advice is welcome. let cell = UITableViewCell(style: .default, reuseIdentifier: "locationDetailMapCell") 						 let mapView = MKMapView() 						 mapView.frame = CGRect(x: 0, y: 0, width: view.frame.size.width, height: 400) mapView.mapType = .standard mapView.showsUserLocation = true mapView.isZoomEnabled = true mapView.isScrollEnabled = true mapView.setRegion(MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: CLLocationDegrees(currentLocation.latitude), longitude: CLLocationDegrees(currentLocation.longitude)), span: MKCoordinateSpan(latitudeDelta: 0.02, longitudeDelta: 0.02)), animated: true) 						 let pin = MKPointAnnotation() pin.coordinate = CLLocationCoordinate2D(latitude: CLLocationDegrees(currentLocation.latitude), longitude: CLLocationDegrees(currentLocation.longitude)) mapView.addAnnotation(pin) 						 cell.addSubview(mapView) 						 return cell
0
0
500
Oct ’20
setAlternateIconName not working (on some devices)
I have a strange problem using an alternate icon using setAlternateIconName. A primary app icon is defined via the Assets.xcassets and an alternative icon via the Info.plist (the files are copied into the project). Everything works fine on an iPhone 11 Pro Max with iOS 15.0. On an iPhone Xs with iOS 15.0, however, I observe the following behavior: the primary icon is visible when installing the app. The alternative icon can also be activated. If I then switch back to the primary icon, the alternative and not the primary icon appears directly in the iOS in-app dialog. If I then move the app to the background, I see the primary icon on the home screen for a second as desired, but then it changes back to the alternative icon. Thus, the primary icon cannot be restored at any time. At the same time, the app also receives the information that the alternative icon name is nil, so that the primary icon should be displayed - but this is not the case. I also don't get an error message about a possibly missing image file and it only happens on one of two (physical) test devices. Does anyone have any advice on what to investigate further?
1
0
628
Oct ’21