Common method in Swift

1. Check for any field empty in NSDictionary class func checkforEmptyValueinDictioanty(dic:NSDictionary)-> Bool{ for (keyVal, dataVal) in dic {   if (dataVal.length()==0){                 println("\(keyVal): \(dataVal.length())")                 return false             }                 ... Continue Reading →


Use HexColor in Swift as a color

Add it in your class  extension UIColor {    convenience init(red: Int, green: Int, blue: Int) {        assert(red >= 0 && red <= 255, "Invalid red component")        assert(green >= 0 && green <= 255, "Invalid green component")        assert(blue >= 0 && blue <= 255, "Invalid blue... Continue Reading →

iPhone UITableView cells stay selected-Problem

Msy Many Times , we have seen UITableView cells stay selected . we can solve this problem by two methods 1. put following code in didSelectRowAtIndexPath. [tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:YES]; 2. put code in viewWillAppear. - (void) viewWillAppear:(BOOL)animated { [tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:animated]; [super viewWillAppear:animated]; }

Add Search Into a Table View

In the mobile app world, people want their information fast, and they want it now!iOS users expect their data to be available on-demand and presented quickly. Furthermore, they expect this to all happen in an easy to use and intuitive manner. It’s a tall order, to be sure!Many UIKit based applications utilize the UITableView as... Continue Reading →

Blog at

Up ↑

%d bloggers like this: