AFKPageflipper iOS 7 issue - iphone

I have implemented AFKPageflipper for page flip action as like flip board app.But flip animation was not working properly on iOS 7 as expected.But its working fine on below version.
I am wondering about this issue.Can anyone please suggest me solution to this.
Thanks in advance.

Please change your code on AFKPageFlipper.m according to the instructions here https://github.com/mtabini/AFKPageFlipper/issues/28
I got it working with the following change:
if ([self respondsToSelector:#selector(drawViewHierarchyInRect:afterScreenUpdates:)])
[self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
else // iOS 6
[self.layer renderInContext:UIGraphicsGetCurrentContext()];

Related

iOs 6 rotation and how To Integrate Cocos2D and UIKit?

Used the Ray Wenderlich tutorial "How to Intergrate UIKit and Cocos2D" mentioned here and it worked great unthil iOs6 was released, then, I get the "Orientation Problem on iOS 6"...
Help? How to apply the fix for the rotation problem? http://www.cocos2d-x.org/news/73
Note: My question is for a project that combines UiKit and Cocos2D like Ray's tutorial?
I have posted my code excerpt and structure here:
http://www.raywenderlich.com/forums/viewtopic.php?f=20&t=1081&p=34166#p34166
I am sorry that I am a beginner :(
Where should I apply the two parts of the fix?
In MainMenuViewController.m?
Or, do I need to download the lastest Cocos2D framework and redo a lot of development for theis almost completed app..?
Cheers,
Andrea
The way I solved it is by following the solution in the comments to this implementation (which is similar to the one in the RW tutorial):
Tinytimegames - cocos2d and storyboards
The specific code posted by "Pierre" there is:
And if you want your glView to resize:
CCGLView *glView = ...
glView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
This forces the glView to resize automatically when the device orientation changes.

Code stopped working after upgrade to iOS 5

I had these two lines of code that worked in iOS 4. Following an upgrade to iOS 5, it no longer works.
The code would put a background image on the Navigation bar.
CGImage navban = CGImage.FromPNG(new CGDataProvider("images/banner.png"), null, false, CGColorRenderingIntent.Default);
NavigationController.NavigationBar.Layer.Contents = navban;
I am using MonoTouch. Does this no longer work in iOS 5? If so, is there another way to accomplish it?
Thanks.
The property BackgroundImageForBarMetrics of UINavigationBar should do the trick. It's new in ios5 and supports this scenario without going behind UIKit's back.

UITextField background behaviour change from iOS 4 to iOS 5

In my app I have a UITextField which is on top of a background image. Under iOS 4 I had to set the backgroundColor property to 'clearColor' in order to make it look right. Under iOS 4 the textfield looks like this...
This is how I want it to look. Now, since upgrading to Xcode 4.3 (iOS 5) when I re-run the same project, the box looks like this...
Grrr. So under iOS 5 I changed the backgroundColor property to 'whiteColor' and it works fine. However now, under iOS 4.x the box looks like this...
Note the ugly white corners! So please, can anyone tell me what I should be doing here in order to get it to look normal under both iOS 4 and iOS 5 (i.e. To look like the first image!).
Many thanks,
Simon
I got the same problem a few days ago. To solve this, I just set the borderStyle and comment the backgroundColor line. Everything just work fine, both iOS4 and iOS5.
// textField.backgroundColor = [UIColor clearColor]; // just leave it, dont't set
textField.borderStyle = UITextBorderStyleRoundedRect;
This is what i did to resolve this issue, you can check the version of iOS running on the device and do the handling accordingly, like this
float version = [[[UIDevice currentDevice]systemVersion]floatValue];
if(version < 5.0)
{
//user clear color
}else
{
//use white color
}
Hope this helps you.
Sometimes you might have to rebuild your project. Also, try and make this in a whole new project to see if it is actually a new change to Xcode, or if it is just that particular project to narrow things down. If you then isolate it to being something wrong with your particular project, try and "do it over" to see if it clicks then. But i see you solved it :=)

iOS 5 Camera not working like it did in 4.x

I have an app that worked perfectly fine w/ ios 4.x
the app works like this
launch app
click button that launches camera
take pic
click use
this takes you to another screen where you can tag the photo
etc...
Now when i click use button the app just freezes, there is no crash, no debug message nothing. I have tried setting break points etc.. and I just dont know what else to try. Any help is greatly appreciated.
--thx
I post another answer to make the answer clearer.
I just found the ( simple ) solution to this problem:
I replaced:
[[[UIApplication sharedApplication] keyWindow] setRootViewController:self];
[[self parentViewController] dismissModalViewControllerAnimated:YES];
by:
[self dismissModalViewControllerAnimated:YES];
It worked on iOS 5 as it was working on iOS 4. I didn't test in iOS 4 yet but I think it's working similarily.
Please confirm me it's also working for you.
If it is freezing, without a crash, then you might be stuck in an infinite loop somewhere. As long as you are attached to the debugger when it is running, you can just pause the application while it is stuck, and it should give you some indication where it is getting held up.

UIActivityIndicatorView doesn't work on iPhone 4 with iOS4

I noticed in one of my apps that the activity indicator doesn't seem to work on an iPhone 4. It works fine on an old iPhone upgraded to iOS 4 just not on an iPhone 4. Does anyone know why it isn't working?
This code should do the job, is that correct;)?
#import <QuartzCore/QuartzCore.h>
...
activityIndicatorInstance.layer.shadowColor = [UIColor grayColor].CGColor;
activityIndicatorInstance.layer.shadowRadius = 1;
activityIndicatorInstance.layer.shadowOpacity = 0.5;
activityIndicatorInstance.layer.shadowOffset = CGSizeMake(0, 1);
oddly it uses a transparent alpha channel on the iPhone 4.
A solution may be to add a kind of background...
I had the same problem, but found that if I coded it rather than using Interface Builder it worked.
If your design allows, you can also use the UIActivityIndicatorViewStyleGray or attempt to add a dark shadow to the activityView's layer.
I solve the problem, in iOS5 the frame size is already set. In iOS4 you need to set the frame size yourself. Hope it helps.