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

using a UILocalNotification to play a sound that's not in the app bundle

Is it possible to use a UILocalNotification (or any outside notification/long-term multitasking) to play a sound outside an app that’s NOT in the main application bundle? Documentation for UILocalNotification says the soundName attribute must be the name of a file in the main bundle. I threw together a quick app that confirms this. Is there […]

floor double by decimal place

i want to floor a double by its decimal place with variable decimal length (in iphone sdk). here some examples to show you what i mean NSLog(@”%f”,[self floorMyNumber:34.52462 toPlace:2); // should return 34.52 NSLog(@”%f”,[self floorMyNumber:34.52662 toPlace:2); // should return 34.52 NSLog(@”%f”,[self floorMyNumber:34.52432 toPlace:3); // should return 34.524 NSLog(@”%f”,[self floorMyNumber:34.52462 toPlace:3); // should return 34.524 NSLog(@”%f”,[self […]

Objective-C: When to know that you are abusing the SIngleton method of Global Variables

So my clients iphone app has balloned from 5 or so classes to over 25 in the last few weeks. With such a large (for the iphone anyway) class structure I’ve been utilizing the Singleton class for accessing global variables. The problem is that whenever I need to access a variable outside of the class […]

Duplicate symbol _OBJC_CLASS_$_Facebook

I’m building an ARC iphone app, and about to integrate the addThis ios library. I get the following error: ld: duplicate symbol _OBJC_CLASS_$_Facebook in /Users/mars/Desktop/Pst/trunk/Pst/ThirdPartyLibs/FBConnect/FacebookSDK/FacebookSDK.framework/FacebookSDK(Facebook.o) and /Users/mars/Library/Developer/Xcode/DerivedData/Pst-bqmphjiqldalzsankfvxugsurcdj/Build/Intermediates/Pst.build/Debug-iphonesimulator/Pst.build/Objects-normal/i386/Facebook.o for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) I’ve double checked with my Compile Resource, and only 1 facebook.m […]

Why is NSPopUpButtonCell showing correctly when only setObjectValue:nil is called?

An NSTableView has multiples NSCells (indirectly via NSTableColumn). NSCell follows the Flyweight design pattern; they’re cookie-cutters. There’s one cell per column and it’s asked to draw itself for each row. “Here’s a value, draw it on the first row; here’s the value for the second row, etc.” This is in contrast to view-based tableviews which […]

HTTP/2 Server Push in iOS 10

I am trying to get server push working on iOS 10. I am working off of the Akamai HTTP/2 demo. https://http2.akamai.com/demo The following is my attempt at testing server push. @interface ViewController () <NSURLSessionTaskDelegate> @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration: defaultConfigObject delegate: self […]

How to make Images in UITableViewCell scroll smoothly?

I’m loading images into my UITableViewCell and it is becoming choppy. I only have around 5-10 cells max. Are there any easy ways to fix this? – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”appointmentCell”; AppointmentTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; NSDictionary *appointmentDictionaryTemp = [self.appointmentArray objectAtIndex:indexPath.row]; cell.patientNameLabel.text = [appointmentDictionaryTemp objectForKey:@”patient”]; cell.appointmentTimeLabel.text = [appointmentDictionaryTemp […]

NSPopButton with list of font families

How can I create a NSPopupButton with a list of font families where each item is in its own font as shown in the attached screenshot. I want to use bindings to achieve this. I am able to populate the NSPopupButton by binding NSPopupButton content to value returned by [[NSFontManager sharedFontManager] availableFontFamilies] but I can’t […]

How can I get information about who called a method?

I’d like to get some information on who called a particular method. Namely, if possible, getting the line number and file name of the method that made the call. Akin to FILE and LINE, except one level down in the stack. This is possible in high-level languages, but any way to do it in Objective-C? […]

My iOS app is not showing App Icon in Simulator

I have added all required icons in asset catalogs as well as in my application, but it is not showing icon on simulator