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

UIGestureRecognizer and UITableViewCell issue

I am attaching a UISwipeGestureRecognizer to a UITableViewCell in the cellForRowAtIndexPath: method like so: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; UISwipeGestureRecognizer *gesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipe:)]; gesture.direction = UISwipeGestureRecognizerDirectionRight; [cell.contentView addGestureRecognizer:gesture]; […]

Custom Annotation view for userlocation not moving the mapview

Can we have custom annotation view for the users current location in iOS? I need to remove the blue dot (with circles) with my own custom view (say some ping pin). Is it possible to do this? If we do, does this pin move to new location when there is change in user’s location? Or […]

AutoLayout with hidden UIViews?

I feel like it’s a fairly common paradigm to show/hide UIViews, most often UILabels, depending on business logic. My question is, what is the best way using AutoLayout to respond to hidden views as if their frame was 0x0. Here is an example of a dynamic list of 1-3 features. Right now I have a […]

How does the iOS app Display Recorder record the screen without using private API?

The iOS app Display Recorder claims to be able to record the screen of an iOS device, even while it is in the background. Given that UIGetScreenImage() is private API and will lead to a rejection on application submission when detected by the static analysis Apple runs, how were they able to do this recording […]

Custom nav bar styling – iOS

Possible Duplicate: How to add background image on iphone Navigation bar? iOS – How did the NY Times do this custom top navigation bar styling? And for that matter, the bottom one? Thanks…

UITableView with static cells does not appear

I have created a new Xcode project using Storyboards (tab view template). I added a couple of view controllers to my storyboard, and wanted to use a UITableView with static cells for one. I created it, but when I run in the simulator the cells don’t appear. I haven’t changed anything in the project except […]

Can UIView be copied?

Simply using this way UIView* view2 = [view1 copy]; //view1 existed This will cause simulator can not launch this app. Try retain, UIView* view2 = [view1 retain]; //view1 existed //modify view2 frame etc Any modifications to view2 will apply to view1, I understand that view2 share same memory with view1. Why can’t UIView be copied? […]

resizing a UIImage without loading it entirely into memory?

I’m developing an application where a user could potentially try and load very very large images. These images are first displayed as thumbnails in a table view. My original code would crash on large images, so I’m rewriting it to first download the image directly to disk. Is there a known way to resize an […]

How to use Namespaces in Swift?

The documentation only mentions nested types, but it’s not clear if they can be used as namespaces. I haven’t found any explicit mentioning of namespaces.

How to add a 'Done' button to numpad keyboard in iOS

So, the numpad keyboard doesn’t come with a ‘Done’ or ‘Next’ button by default so I’d like to add one. In iOS 6 and below there were some tricks to add a button to the keyboard but they don’t seem to be working in iOS 7. First I subscribe to the keyboard showing notification [[NSNotificationCenter […]