Skip to content
Snippets Groups Projects
Commit 0be00737 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

iOS: fix warning for iOS7

parent a2982e63
No related branches found
No related tags found
No related merge requests found
...@@ -221,7 +221,7 @@ void axis_to_quat(double a[3], double phi, double q[4]) ...@@ -221,7 +221,7 @@ void axis_to_quat(double a[3], double phi, double q[4])
static double static double
tb_project_to_sphere(double r, double x, double y) tb_project_to_sphere(double r, double x, double y)
{ {
double d, t, z; double d, z;
d = sqrt(x*x + y*y); d = sqrt(x*x + y*y);
......
...@@ -369,7 +369,7 @@ void getBitmap(void *self, const char *text, int textsize, unsigned char **map, ...@@ -369,7 +369,7 @@ void getBitmap(void *self, const char *text, int textsize, unsigned char **map,
lbl.font = [UIFont systemFontOfSize:textsize]; lbl.font = [UIFont systemFontOfSize:textsize];
[lbl setText:[NSString stringWithCString:text encoding:[NSString defaultCStringEncoding]]]; [lbl setText:[NSString stringWithCString:text encoding:[NSString defaultCStringEncoding]]];
[lbl setBackgroundColor:[UIColor clearColor]]; [lbl setBackgroundColor:[UIColor clearColor]];
CGSize lblSize = [[lbl text] sizeWithFont:[lbl font]]; CGSize lblSize = [[lbl text] sizeWithAttributes:@{NSFontAttributeName:[lbl font]}];
*realWidth = lblSize.width; *realWidth = lblSize.width;
int i; int i;
for(i=2;i<*realWidth;i*=2); *width = i; for(i=2;i<*realWidth;i*=2); *width = i;
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
[self.navigationController setToolbarHidden:NO]; [self.navigationController setToolbarHidden:NO];
control = [[UISegmentedControl alloc] initWithItems:[[NSArray alloc] initWithObjects:@"Model", @"Display", nil]]; control = [[UISegmentedControl alloc] initWithItems:[[NSArray alloc] initWithObjects:@"Model", @"Display", nil]];
control.segmentedControlStyle = UISegmentedControlStyleBar;
UIBarButtonItem *controlBtn = [[UIBarButtonItem alloc] initWithCustomView:control]; UIBarButtonItem *controlBtn = [[UIBarButtonItem alloc] initWithCustomView:control];
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil]; self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment