In Tangram's current demo app, the below method is defined in MapViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
TGMapView *mapView = (TGMapView *)self.view;
mapView.mapViewDelegate = self;
mapView.gestureDelegate = self;
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
}
The first thing that happens, after super, is a downcast of the self.view to be of type TGMapView. Two questions that might have the related answers:
Generally, where is self.view assigned a value?
With what init method is a view or custom view created?
After further research, I found this on the apple docs. It seems to imply that custom UIView must have these inits. It isn't clear to me why two different inits would be required, but I can assume that apple uses one or both to initialize the view.