iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.
Get push notification while App in foreground iOS
I am using push notification service in my app. When app is in background I am able to see notification on notification screen(screen shown when we swipe down from top of iOS device). But if application is in foreground the delegate method – (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo is getting called but notification is not displayed in notification […]
How to detect touches in status bar
I have custom view in my application which can be scrolled by the user. This view, however, does not inherit from UIScrollView. Now I want the user to be able to scroll this view to the top, just as any other scrollable view allows. I figured that there is no direct way to do so. […]
Annotation details after detail disclosure pressed?
I have a MKMapView annotation object that has a right callout accessory detail disclosure button. When the button is pressed I am using addTarget:action:forControlEvent to call a selector method which creates a detail viewController and pushes it onto the view stack. My question is what is the best way to access the information on the […]
How to embed small icon in UILabel
I need to embed small icons ( sort of custom bullets ) to my UILabels in iOS7. How can I do this in interface designer? Or at least in code? In Android there are leftDrawable and rightDrawable for labels, but how it is done in iOS? Sample in android :
iPad Safari scrolling causes HTML elements to disappear and reappear with a delay
I’m currently developing a web app using html5 and jQuery for iPad Safari. I’m running into a problem wherein large scroll areas cause the elements that are offscreen to appear after a delay when I scroll down to them. What I mean by that is, if I have a row of images (or even a […]
Rotate SCNCamera node looking at an object around an imaginary sphere
I’ve got an SCNCamera at position(30,30,30) with a SCNLookAtConstraint on an object located at position(0,0,0). I’m trying to get the camera to rotate around the object on an imaginary sphere using A UIPanGestureRecognizer, while maintaining the radius between the camera and the object. I’m assuming I should use Quaternion projections but my math knowledge in […]
Difference between vs init]
can someone tell me the difference in declare an mutable array with: NSMutableArray *array = [NSMutableArray array]; and NSMutableArray *array = [[NSMutableArray alloc] init]; Because in the beginning I was declaring all my arrays with alloc, and if in the end of a certain function I returned the array created with alloc, I had to […]
How can I convert from degrees to radians?
I am trying to convert this Obj-C code to Swift code but I don’t know what the equivalent of this code should be ? #define DEGREES_TO_RADIANS(degrees)((M_PI * degrees)/180) I googled and found this But I don’t understand how to convert that in Swift in my case?
Weak Linking – check if a class exists and use that class
I’m trying to create a universal iPhone app, but it uses a class defined only in a newer version of the SDK. The framework exists on older systems, but a class defined in the framework doesn’t. I know I want to use some kind of weak linking, but any documentation I can find talks about […]