Neel kamal

Adding a Controller

MVC stands for model-view-controller.  MVC is a pattern for developing applications that are well architected, testable  and easy to maintain. MVC-based applications contain: Models: Classes that represent the data of the application  and that use validation logic to enforce business rules for that data. Views: Template files that your application uses to dynamically  generate HTML […]

Introduction to MVC

Getting Started Start by installing and running Visual Studio Express 2013 for Web or Visual Studio 2013. Visual Studio is an IDE, or integrated development environment. Just like you use Microsoft Word to write documents, you’ll use an IDE to create applications. In Visual Studio there’s a toolbar along the top showing various options available to […]

How to create UITableView in Xcode 5 Using Storyboard

When we first started the iOS programming course, we wrote a tutorial about UITableView and showed you how to create a simple table app using UITableView. This is one of our most popular tutorials. However, you may find it no longer works in Xcode 5. The latest version of Xcode promotes the use of Storyboard over Interface […]

UICollectionView custom layout tutorial

  For a recent project I needed to refactor a primary view within our iPad app, so I decided to learn the ins and outs of UICollectionView (introduced in iOS 6) and I thought it would make for a good tutorial to share. My project ended up needing a custom UICollectionViewLayout which meant I needed […]

How to replace all occurrence of a character in javascript ?

Suppose you have to replace all double quotes (“) into Single quotes (‘). Then write the code as var regex = new RegExp(‘”‘, ‘g’); str = str.replace(regex, ‘\”); Input: “Hello world”. Output: ‘Hello world’.

Delegate and datasource method for UITableView

Here is all the delegate and datasource method for UITableView @protocol UITableViewDelegate @optional //Display customization – (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath; // Variable height support – (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; – (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section; – (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section; //Section header & footer information. Views are preferred over title should you decide to provide both […]

How to make numeric textbox. Only digits are allowed in textbox.

Here is a really simple code for a numeric text box and it will work in all browsers. function CheckNumeric(e) { if (window.event) // IE { if ((e.keyCode 57) & e.keyCode != 8) { event.returnValue = false; return false; } } else { // Fire Fox if ((e.which 57) & e.which != 8) { e.preventDefault(); […]