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

RestKit: mapping JSON array of strings

Given the following JSON: { “someKey”:”someValue”, “otherKey”:”otherValue”, “features”:[ “feature1”, “feature2”, “feature3” ] } I am mapping this JSON into NSManagedObjects with RKMapperOperation and RKEntityMapping(in this example I would have 2 entity mappings: one for the top level object and another one for my Feature class). The top level object mapping is trivial: two attribute mappings […]

Image Processing in iPhone

Actually I am adding Image Processing Feature in my iPhone Application It should do Brightness, Contrast, Sharpen, Exposure…. But i am not able to Find any article/Tutorial on the Internet. Will you please help me to find any tutorial or tell me how can i implement the iPhone View Based Application. I have found 1 […]

Code Signing Error

The company I am working for has a base app that they reskin and sell to different businesses. I have redesigned the app and am trying to upload it to their account but am getting: [BEROR]Code Sign error: The identity ‘iPhone Distribution’ doesn’t match any valid certificate/private key pair in the default keychain How do […]

IP camera stream with UIWebview works on IOS 5 but not on IOS 6

Hi im streaming an ip camera on my website and I embed my website on a UIWebview , is working ok with IOS 5 but when i open my app on IOS 6 only shows a image and not the video. On my website im using <iframe width=”640″ height=”480″ src=”http://112.214.96.41:87/videostream.cgi?user=user&pwd=” frameborder=”0″></iframe> please somebody help me, […]

CGContextSaveGState vs UIGraphicsPushContext

There are two drawRect methods: – (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); // do drawing here CGContextRestoreGState(context); } And – (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(context); // do drawing here UIGraphicsPopContext(); } UIGraphicsPushContext / UIGraphicsPopContext are from UIKit while CGContextSaveGState / CGContextRestoreGState are from CoreGraphics. Questions: What is the difference between those methods? […]

NSThread sleepfortimeinterval blocks main thread

I want to simulate a communication with a server. As the remote server will have some delays I want to use a background thread that has on it [NSThread sleepForTimeInterval:timeoutTillAnswer]; The thread is created with NSThread sub classing and started … However I noticed that sleepForTimeInterval is blocking the main thread… Why??? Isn’t a NSThread […]

Presenting a UINavigationController in a custom modal

I’m trying to present a UINavigationController from a UINavigationController. I’m using the new iOS 7 transitioningDelegate stuff and it’s working great…. except the navigation bar starts out tall and then shrinks when the animation is over. I’m assuming it shrinks because the bar doesn’t touch the top of the screen, but why does it start […]

Remove a ReactiveCocoa signal from a control

If I assign a signal to a property of a control: RAC(self.loginButton.enabled) = [RACSignal combineLatest:@[ self.usernameTextField.rac_textSignal, self.passwordTextField.rac_textSignal ] reduce:^(NSString* username, NSString* password) { return @(username.length > 0 && password.length > 0); }]; But then wanted to assign a different RACSignal to enabled, how can I clear any existing one before doing so? If I try […]

Xcode 5 and phonegap: linker errors on building for device but not for simulator

Our phonegap app builds fine for the iphone simulator but generates linker errors when building the app on an iphone. the only thing that changed was installing testflight and a test app. We already removed testflight and the test app, but the linker errors remain. Any ideas on how to fix this? We’re on xcode […]

Is it better to write 0.0, 0.0f or .0f instead of simple 0 for supposed float or double values

Hello well all is in the title. The question apply especially for all those values that can be like NSTimeInterval, CGFloat or any other variable that is a float or a double. Thanks. EDIT: I’m asking for value assignment not format in a string. EDIT 2: The question is really does assigning a plain 0 […]