I cannot understand why my MKMapView does not want to change to satellite view. This method is called and case 1 is called I have stepped over it but it simply does not change to satellite type it always changes to standard. It only works when it goes back to Map type. Anyone have any ideas?
- (IBAction)mapSatelliteSegmentControlTapped:(UISegmentedControl *)sender
{
switch (sender.selectedSegmentIndex)
{
case 1: //Satellite
self.mapView.mapType = MKMapTypeSatellite;
default: //Map
self.mapView.mapType = MKMapTypeStandard;
}
}
So if a have this property:
@property (nonatomic, retain) MKReverseGeocoder *reverseGeocoder;
and i want to set it, does the case always change:
[self setReverseGeocoder: ...
Seems a bit weird to get used to! I mean the property name is lower case!
I am using Xcode's SplitView template as the base for my project and I only want to accept Landscape mode.
I have implemented the method in the RootViewController and DetailViewController:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
switch (interfaceOrientation)
{
case UIInterfaceOrientationLandscapeLeft:
return YES;
}
return NO;
}
However what happens is the app loads with in Landscape mode with the tableview on the left but the detail view is black / blank.
How do I get the detailview to load properly and do I need to implement this method is all view controllers or just the root one?
How do I get intellisense to pop up while I am coding? I know it pops up when I start typing a known type e.g.:
if I type NSS it will finish it for me NSString.
How do I get it to give me a bunch of options like in Visual Studio e.g.:
if I type NS I want to see what my options are like NSString, NSInteger etc?
And if I have not typed anything I still want a bunch of options like all the instance variables etc.
Like Visual Studio, I want the code completion menu to popup immediately after I start typing.
I don't mean the completion inline - I mean I want the same window that popups when you press esc to appear.
Is there anyway of doing this?
Does anyone know why setting the map as hybrid has no effect. Setting it as standard and satellite works fine though?
[mapView setMapType: MKMapTypeHybrid];
I cannot understand why the date is never set in the title - it's always ignored and if I swap around the date and the title, then the title is ignored!
-(id)initWithCoordinate:(CLLocationCoordinate2D)c title:(NSString *)t
{
[super init];
coordinate = c;
NSDate *today = [NSDate date];
[self setTitle:(@"%@%@", [today description], t)];
//[today release];
return self;
}
In the Stanford course the lecturer uses some shortcut to create both braces when implementing a new method. I know in Visual Studio you use TAB TAB, what do you use in Xcode?