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

Send and receive messages through NSNotificationCenter in Objective-C?

I am attempting to send and receive messages through NSNotificationCenter in Objective-C. However, I haven’t been able to find any examples on how to do this. How do you send and receive messages through NSNotificationCenter?

Undefined symbols for architecture armv7

This problem has been driving me crazy, and I can’t work out how to fix it… Undefined symbols for architecture armv7: “_deflateEnd”, referenced from: -[ASIDataCompressor closeStream] in ASIDataCompressor.o “_OBJC_CLASS_$_ASIDataDecompressor”, referenced from: objc-class-ref in ASIHTTPRequest.o “_deflate”, referenced from: -[ASIDataCompressor compressBytes:length:error:shouldFinish:] in ASIDataCompressor.o “_deflateInit2_”, referenced from: -[ASIDataCompressor setupStream] in ASIDataCompressor.o ld: symbol(s) not found for architecture armv7 […]

proposedDestinationIndexPath wrong due to header

I am trying to set up a table view where I can move rows up and down. When moving a cell the place in the tableView where room is made for the cell appears to be about 2 rows too high. When moving a cell I am logging the proposed indexPath through: – (NSIndexPath*) tableView:(UITableView […]

UIbezierPath not appearing on streched Image using Asset's Slicing tool

I have a UIScrollView with an UIImageView inside it and I Have a let’s say RulerView on top of them which has the same width of scrollView and drawing some lines on it using UIbezierPath inside its override function draw(_ rect: CGRect) method ,and it worked well. but since I set Horizontal slicing for my […]

iPhone Data Usage Tracking/Monitoring

I’ve searched over this topic but found very few details which were helpful. With these details I’ve tried to cook some code as follows. Note: Please compare the details shared in this post with other posts before marking this as DUPLICATE, and not just by the subject. – (NSArray *)getDataCountersForType:(int)type { BOOL success; struct ifaddrs […]

Shall we always use inside closure in Swift

In WWDC 2014 session 403 Intermediate Swift and transcript, there was the following slide The speaker said in that case, if we don’t use [unowned self] there, it will be a memory leak. Does it mean we should always use [unowned self] inside closure? On line 64 of ViewController.swift of the Swift Weather app, I […]

How to change the Push and Pop animations in a navigation based app

I have a navigation based application and I want to change the animation of the push and pop animations. How would I do that?

User-entered values saved to Core Data (?) but not appearing in table view

I’ve been struggling with user-entered values showing up correctly in a table view in a project I’m working on. The way I get the user entered values is by getting the user to enter information (company name, stock symbol, and a URL for the logo) into text fields, then calling handleSave() when the done button […]

How to use NSJSONSerialization

I have a JSON string (from PHP’s json_encode() that looks like this: [{“id”: “1”, “name”:”Aaa”}, {“id”: “2”, “name”:”Bbb”}] I want to parse this into some sort of data structure for my iPhone app. I guess the best thing for me would be to have an array of dictionaries, so the 0th element in the array […]

How to make a UITextField move up when keyboard is present?

With the iPhone SDK: I have a UIView with UITextFields that brings up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the keyboard is brought up Automatically “jump” (by scrolling up) or shortening I know that I need a […]