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

How to call web service after each certain number of data received and load it into table view

I am working on a project in which at first web service call we are getting some 20 number of data which we are loading to table view and once we start scrolling up for view when it reaches 20 number we need to call service for next 20 no’s, like facebook does. This we […]

Getting the world's contactListener in Box2D

I’m writing a game for Mac OS using cocos2D and Box2D. I’ve added a b2ContactListener subclass to my world as follows: contactListener = new ContactListener(); world->SetContactListener(contactListener); This works perfectly, but I am unsure of the best/accepted way to access the contact listener from other classes that don’t currently have a direct reference to the contact […]

OK to retain ASIHTTPRequest delegate?

Is it OK to retain a delegate of a subclass of ASIHTTPRequest? I made a subclass of ASIHTTPRequest called JSONRequest. Each instance of JSONRequest is its own delegate, handles the callbacks, and passes them on to jsonDelegate, which is a private property of JSONRequest, and responds to requestFinished:withResult:, where result is an NSDictionary representation of […]

Does “self.propery = init];” leak memory?

Is it safe in Objective-C to write self.propery = [[SomeClass alloc] init]; instead of SomeClass *tmp = [[SomeClass alloc] init]; self.property = tmp; [tmp release]; or will the first form leak memory?

iphone-non-global uiimageview detection

Background:I am using XCode 3.1.4, keep this in mind. Please do not comment about it however. I have to butttons, fire and start. When fire is pressed, a UIImageView named one is created using the IBAction function. When start is pressed, a UIImageview named two is created. Then, when *one is created in the IBACtion […]

AES256 decryption issue in Objective-c

I am trying to use the following snippet to decrypt file, which was encrypted with 32 byte key. So when I am trying to encrypt file data, everything is going ok. But when I am trying do decrypt, program even don’t pass the condition if (cryptStatus == kCCSuccess) in CryptoExtensions.m. I am really tired figuring […]

iOS: Best Way to do This w/o Calling Method 32 Times?

I’m currently retrieving the Top 100 Scores for one of my leaderboards the following way: – (void) retrieveTop100Scores { __block int totalScore = 0; GKLeaderboard *myLB = [[GKLeaderboard alloc] init]; myLB.identifier = [Team currentTeam]; myLB.timeScope = GKLeaderboardTimeScopeAllTime; myLB.playerScope = GKLeaderboardPlayerScopeGlobal; myLB.range = NSMakeRange(1, 100); [myLB loadScoresWithCompletionHandler:^(NSArray *scores, NSError *error) { if (error != nil) { […]

How to detect tap on Uitableview cell with uiview and uibutton?

I have created a table view and i am adding my custom uiview into the cell’s content view. The uiview has a uibutton. However i can add the uibutton into the content view when the cell is created. I want to get the tap event on the tableview to perform some action. I also want […]

Get the list of files from selected folders having sizes >100MB with their paths objective c

I want to get the list of all files with their paths & sizes for my mac system. From that, I want to filter only those files which have file size above 100 MB. I got the size of my system using the below code. NSError *error; NSFileManager *fileManager = [NSFileManager defaultManager]; NSDictionary *fileAttributes = […]

CSV not attaching to in app email?

So I have had this problem for sometime and just cant get it working! I have been building a survey app that users simply enter information in and its saved to a csv file. Im now at the stage where I need to attached the csv file within the app to an email address… I […]