Tag: ios

How to change the orientation of the app without changing the device orientation in iphone app

I want to change the orientation of the app without changing the device orientation in iphone app. I want to change my view from portraid mode to landscap mode programmatically. And also want to know that will this be accepted by the apple store or not ? Thanks Now I got the solution from other […]

How to show alert once after installing the app in ios device

How to show an alert only once at the start of an application after installing the application on device or on simulator until I delete it from my device. Is it possible tell me..

How do I make the swipe to kill animation that is used in the iOS 7 app switcher?

I want to use a swipe animation for a custom view that is on top of the view of my UIViewController. The user should be able to swipe up the custom view to the top to send it out of the screen. Exactly like the iOS7 App Switcher gesture to kill an app: At the […]

UITextView with text and images combined

I have this UIScrollView with images inside, all the images are 30×30. I also have a a UITextView under the scrollview. What I want to do is to edit the textview, write some text, than to drag the image to the textview, and it will be added after the text (like emoji). How is it […]

iOS Parse.com inner query doesn't fetch all objects

I am getting trouble with parse.com inner query using. Here is my code. PFQuery *innerQuery = [PFUser query]; [innerQuery whereKey:@”deactive” equalTo:[NSNumber numberWithBool:NO]]; PFQuery *query = [PFQuery queryWithClassName:@”Post”]; [query orderByDescending:@”voteCount”]; [query setLimit:1]; [query whereKey:@”user” matchesQuery:innerQuery]; [query findObjectsInBackgroundWithBlock:^(NSArray objects, NSError error) { //some code }]; Here is a problem. Inner query max limit count is 1000 as […]

MapView: Use MKUserTrackingBarButtonItem to toggle map tracking state

I have added a MKUserTrackingBarButtonItem to my toolbar. But, clicking it does nothing. So, I assumed I need to use addTarget like a normal UIBarButtonItem but that doesn’t work either. How can I attach a method to that button so that I can change setUserTrackingMode:animated:? MKUserTrackingBarButtonItem *trackingItem = [[[MKUserTrackingBarButtonItem alloc] initWithMapView:mapView] autorelease]; UISegmentedControl *segmentedControl = […]

Resizable Centered Circular UIView

I am looking for a way to create a CIRCULAR UIView that is resizable and stays centered (see image). The CIRCULAR view in this example is a UIView subclass WCSDailyGoal. ContainerView.m – (void)createDailyGoalView { _dailyGoalView = [[WCSDailyGoalView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; _dailyGoalView.delegate = self; _dailyGoalView.goal = 200; _dailyGoalView.center = self.view.center; [self.view addSubview:_dailyGoalView]; } WCSDailyGoal.m […]

AVAudioSession mixing with AVSpeechUtterance

I have an issue where I would like to have the iPod playing music in the background and in my application I would like to have AVSpeechUtterance lower the volume of the iPod, play a string of text and then I would like to have the iPod resume playing. I have tried several things but […]

How to apply transform in UIView?

I have applied below transform to UIView’s layer like this: CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; rotationAndPerspectiveTransform.m34 = 1.0 / -850; rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI_4*1.1,0.0f, 1.2f, 0.0f); self.centerView.layer.transform = rotationAndPerspectiveTransform; But not so much success i just wanted to apply transform like shown below image Any help would so much appreciated. Thanks for reading my Question

Add ADBannerView to a SKScene

I’m trying to add an iAd banner to my game over scene, but I don’t know how to add UIView to an SKScene. The app view controller is: – (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; // Configure the view. SKView * skView = (SKView *)self.view; skView.showsFPS = YES; skView.showsNodeCount = YES; // Create and configure the scene. […]