iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

How to crop the image in iPhone

I want to do the same thing as asked in this question. In my App i want to crop the image like we do image cropping in FaceBook can any one guide me with the link of good tutorial or with any sample code. The Link which i have provided will completely describe my requirement.

cocoa get list of installed applications

Is there a way to get all installed applications for the current user in cocoa? NSArray *runningApps = [[NSWorkspace sharedWorkspace] launchedApplications]; The above gives me currently running applications but for my app I need to list all installed applications. I need the application key (e.g. so system_profiler will does not work.

Upload multiple images using AFNetworking

I used the PickerController and loaded a few images on to a NSMutableArray. Now i need to upload all of these images at once. am using AFNetworking and how can i do this? I went through the AFNetworking documentation and there was a section called Creating an Upload Task for a Multi-Part Request, with Progress. […]

Using blocks to pass data back to view controller

I was looking at this question. One of the answers shows how to use blocks to pass data backwards view the prepareForSegue method. My understanding is this method should really be used to pass data forward, not backwards. I’m wanting to try blocks out for this purpose – passing data back to another viewController. My […]

multiple testPerformance with XCTestCase objective-C

I have 2 performance test methods in test class. If i run them separately they pass. If i run hole class methods they fail with message: **** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘API violation – multiple calls made to -[XCTestExpectation fulfill].’* Is there any way to include couple performance tests in 1 […]

NSArray becomes NSCFArray when passed

I have a method that receives many different kinds of objects and decides what to do with them: -(void)performAction:(NSObject *)myAction withItem:(Item *)myItem { actionCount = -1; NSLog(@”– NEW ACTION ARRAY –“); if ([myAction isMemberOfClass:[Look class]]) { currentActionArray = [self createLookArray:(Look *)myAction item:myItem]; } else if ([myAction isMemberOfClass:[Use class]]) { currentActionArray = [self createUseArray:(Use *)myAction item:myItem]; […]

Checking if UIGraphicsBeginImageContextWithOptions is supported

I’m working on an iOS app. It currently only works on iOS 4 since I use the following method on several occasions: “UIGraphicsBeginImageContextWithOptions”. This method is only available in iOS 4 and therefor my app currently crashes/doesn’t work on iPhone OS 3. Aside from this method there is no reason why the app should not […]

iPhone add icon in status bar (a la Battery Indicator)

I was wondering if it is possible to add an icon to the iPhone status bar, much like the battery and wifi indicator. How can I do this? Thanks.

How do I catch global exceptions?

Is there a way to catch global “crashing” app exceptions like objc_exception_throw, EXC_ARITHMETIC etc. in code? I need that because I want to do some things before the app gets killed by the system.

Facebook login page showing blank page in IOS 9

I am using FBSDKCoreKit (4.12.0) FBSDKLoginKit (4.12.0) first i am getting screen 1 This method is block is never called . FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logInWithReadPermissions:@[@”email”,@”public_profile”] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { //never called }]; getting this warning Warning: Attempt to present <FBSDKContainerViewController: 0x16570810> on <ViewController: 0x16528870> whose view is not in […]