What are best practices for validating email addresses on iOS 2.0

The answer to Using a regular expression to validate an email address explains in great detail that the grammar specified in RFC 5322 is too complicated for primitive regular expressions. I recommend a real parser approach like MKEmailAddress. As quick regular expressions solution see this modification of DHValidation: – (BOOL) validateEmail: (NSString *) candidate { … Read more

How do I wrap text in a UITableViewCell without a custom cell

Here is a simpler way, and it works for me: Inside your cellForRowAtIndexPath: function. The first time you create your cell: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.textLabel.lineBreakMode = UILineBreakModeWordWrap; cell.textLabel.numberOfLines = 0; cell.textLabel.font = [UIFont fontWithName:@”Helvetica” size:17.0]; } You’ll notice that I set … Read more

tech