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

iOS XCode compile error: unable to execute command: Segmentation fault: 11

I have a project which compiled perfectly in the past, but after the last xcode update (6.3.2) I get a compile error whenever I try to run it directly on a device. Building and Running it in the simulator works fine. The Archive function works fine as well. But no matter what device I connect […]

How to resize an UIImage while maintaining its Aspect Ratio

I want to resize a UIImage with maintaining its Aspect Ratio. I have written the following code, but it is not working as expected. Code -(UIImage * ) scaleImage: (UIImage * ) image toSize: (CGSize) targetSize { CGFloat scaleFactor = 1.0; if (image.size.width > targetSize.width || image.size.height > targetSize.height) if (!((scaleFactor = (targetSize.width / image.size.width)) […]

How to change background color of a whole section in UICollectionView?

In UICollectionView, I want to give the whole section a uniform background color, instead of for a single cell or for the whole collection view. I don’t see any delegate method to do that, any suggestions?

Which CGImageAlphaInfo should we use?

The Quartz 2D programming guide defines the availability of the various alpha storage modes: Which ones should we use for RGB contexts, and why? For non-opaque contexts, kCGImageAlphaPremultipliedFirst or kCGImageAlphaPremultipliedLast? For opaque contexts, kCGImageAlphaNoneSkipFirst or kCGImageAlphaNoneSkipLast? Does the choice of value affect performance? Typically, I see kCGImageAlphaPremultipliedFirst for non-opaque and kCGImageAlphaNoneSkipFirst for opaque contexts. Some […]

How can I find the address of a stack trace in LLDB for iOS

When I get a crash report, the offending part of my code will sometimes look like this, instead of showing me the actual line number, even though the crash report is symbolicated: -[ViewController myMethod:] + 47 In order to debug this, I need to know what line of my code this represents so that I […]

Upload symbol files

In my Firebase Crash Reporting page i can’t find the full information of crashes (for example the number of row, the file and so on) . I thought it can be because it says Upload symbol file to symbolicate future stack traces for UUID –––-*** telling me to Using the command line, navigate to your […]

is there any way to distribute ios applications outside app store?

Is there any way to distribute ios applications through my own website, not using app store? I mean is there any way that enables end users to download the .ipa file from my website with their browser application and install it directly on their ios device? I have looked around in the web and googled […]

When should we use NSString and NSMutableString?

I want to when should we use NSString and when should we use the NSMutableString, because we can append the string in NSString also,so what is the effective use of NSMutableString in Objective C programming?

Navigation bar with multiple buttons

I have a navigation bar with a left and right button, and I need to put another button next to the right button. Does anyone know how I can go about this? Here is some code to help: – (id)init { self = [super initWithStyle:UITableViewStyleGrouped]; if (self) { _pinArray = [[NSArray alloc]init]; _pinArray = [Data […]

UIWebView: Can I disable the javascript alert() inside any web page?

I am using UIWebView to load a URL. Inside the page of that URL, it uses alert(“whatever msg”) as JavaScript. My UIWebView will pop up a window and show that alert message. Is there a way to disable this kind of popup window or JavaScript alert window?