I have a weird problem with OpenGL on iOS 4.3.
I have a ViewController with some views and images in the foreground. In the background I have an EAGLView drawn from a CGImage.
When I try to pinch, pan or rotate the EAGLView (not the OpenGL object, just the view) with CGAffineTransform and GestureRecognizer, the view sometimes starts blinking.
On iOS 4.2 and other older iOS versions it works fine.
Can anybody help me?
Related
I created a view, but its appearance is wrong and I'm not sure how to correct it. I'm trying to design for an iPad Pro in landscape mode, but in the simulator and on a real device it appears like this.
MacOS 13.1
Xcode 14.2 (14C18)
Not sure where to look next.enter image description here
Just look at the example. The view is smaller than the simulator size and the orientation is portrait instead of landscape.
In Xcode 6.1 when i load the iPhone 6plus simulator along with the huge iPad simulators that all take up the full screen there is a scroll slider in the simulator. When i scroll the simulator a little to the right there is about a quarter of an inch black screen that covers the part that slides. When i did work in Xcode 5.1.1 for this app and iPad simulator loaded full screen it didn't have a scroll slider and it didn't have a black screen for that little part. However, now when i load the same iPad simulator in Xcode 6.1 there is that slider and the quarter of an inch black screen. Inside the storyboard the UIImageView is placed 414 width by 736 height covering the full storyboard so that's why I don't understand.Is that 1/4 inch black screen after scroll supposed to be there or does it mean my background UIImageView is not big enough to fit the entire simulator even though my UIImageView fits the entire storyboard?
Horizontal scrolling not working is a bug in the iOS Simulator in Xcode 6.1. The only workaround is to decrease your window zoom such that the contents fit in the entire window (thus making it so you don't need to scroll).
My setting for the project:
Deployment target: iOS6.1
Base SDK: 7.0
IB Document: Opens in 5.0
When I run app in simulator(7.0) I see almost what I expect (I don't understand why barbuttons don't use color tint — on previous screen it shows blue):
But if app is running on a device (also 7.0),
Then I see:
As you can see this is some kind of iOS6 UI, but tableview goes under the navbar, which became transparent.
Why does it happen?
Behavior of tintColor for bars has changed on iOS 7.0, please check the image below:
So now to change the tint color for your bar buttons you need to use tintColor which is the color for the interactive elements within a navigation bar including button images and titles.
While barTintColor is the background color of the UINavigationBar.
So basically
For buttons and title:
[[UINavigationBar appearance] setTintColor:[UIColor grayColor]];
For bar tint:
[[UINavigationBar appearance] setBarTintColor:[UIColor lightGrayColor]];
For the tableVIew under the navBar part, set navigationBar.translucent = NO;
I enabled Autolayout in IB, and now it uses iOS7 on a device too.
Upd.: After some time it start show strange design again. It gone only after I set iOS7 as base and deployment SDK.
I recently upgraded xcode to 4.5 which installed iPad 6.0. Now when I run PhoneGap html5 app in it the page inside simulator is not rotating, it was working with earlier version of xcode. When I change simulator from portrait to landscape the html page of app remains in portrait, it does not rotate to landscape with simulator.
This solution worked for me:
Edit AppDelegate.m:
Find:
[self.window addSubview:self.viewController.view];
replace with the following code:
self.window.rootViewController = self.viewController;
If you're still displaying the statusbar then inside:
MainViewController.m:
After
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
add
self.webView.frame = CGRectMake ( 0, 15, self.view.frame.size.width, self.view.frame.size.height-15);
Might not be the best fix, but it worked for me!
I've been working on a game using the MapKit Framework and Cocos2D v2.0 library: I display a transparent OpenGL View (EAGLView) managed by Cocos2d above a MKMapView. It's a large project, more than a man-year so far for the iOS client alone.
To have a smooth and synchronized Cocos2d layer with the map pan and zoom, I enable the background thread switch in ccConfig.h (CC_DIRECTOR_IOS_USE_BACKGROUND_THREAD).
Before the last iOS 6 update everything was fine. But in iOS 6, the app crashes in swapBuffers method of CCGLView causing a Bad Access here:
[context_ presentRenderbuffer:GL_RENDERBUFFER]
I'm wondering if it's related to multi threading and OpenGL. It only happens with the background switch on and the MKMapView.
I already tried with the map and without the background thread enable for cocos,
I tried also cocos in background thread without the map, and no crashes.
Thanks,