Tag: iphone

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 […]

fb ios sdk session for use with existing fb connect website

How does my fb connect webserver authenticate a user that logged in via fb ios sdk? I have a website which uses facebook connect. In it, i do use the app secret to authenticate the user via a cookie created by the facebook javascript sdk via the facebook python library: def get_user_from_cookie(cookies, app_id, app_secret): “””Parses […]

How can I supersede the built-in swipe gesture recognizer in UICollectionView?

We’re building an app that takes advantage of the new UICollectionView in iOS 6. However, we need to implement a long-press behavior such that even if the user then moves their finger after, we want it ignored. i.e. User touches the screen than instantly moves -> Swipe User touches the screen, pauses, then moves -> […]

Acessing a wordpress database from an iPhone App

I’ve been asked to create an app that will get data back from a database where the CMS will be WordPress. I’ve never used a CMS so I’m trying to get a (overview)picture in my head of how it could all work and what each of the components would be. And what a CMS actually […]

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 […]

Execute a “prepared” math operation in Objective-C

I want to to math operations with some kind of prepared formula that would look like tan(%f)*1000 or %f+%f where the %f has to be replaced by an argument. Is there a function in Objective-C that I can pass the format of my formula and the required numbers to execute this prepared operation? I hope […]

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 = […]

How to animate UIButton background color

I want to change the UIButton background color from black to white color. But I want to change it in animation. For example… black > grey > white. Is there any simple way to do so in iPhone SDK? thank you.

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