很简单,不要以模态方式呈现它。
UIViewController *controller = [[UIViewController alloc] initWithNibName:@"myXib" bundle:[NSBundle mainBundle]];
[controller.view setFrame:CGRectMake(0, 480, 320, 320)];
[self.view addSubview:controller.view];
[UIView animateWithDuration:0.5 animations:^{
[controller.view setTransform:CGAffineTransformMakeTranslation(0, -320)];
}];
要更改颜色,我建议您将颜色色调的整数值存储到一个数组中,这样您就可以从数组中某个对象的整数值稳定地分配色调:
arrayOfColors = [[NSArray alloc] initWithObjects:@"0.0", @"0.1", @"0.2", @"0.3", @"0.4", @"0.5", @"0.6", @"0.7", @"0.8", @"0.9", nil];
[[UIColor colorWithHue:[[arrayOfColors objectAtIndex:someIndex]floatValue] saturation:1.0 brightness:1.0 alpha:1.0]setStroke];