Posts

Showing posts from December, 2016

how to make login page in iphone using HTTP Post method

- (void)viewWillAppear:(BOOL)animated {     [super viewWillAppear:animated];     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; } - (void)viewDidLoad {     [super viewDidLoad];     // Do any additional setup after loading the view from its nib.      // appDelegate=(AppDelegate*)[[UIApplication sharedApplication]delegate];  //   defaults=[NSUserDefaults standardUserDefaults];     usename_text.delegate=self;     password_text.delegate=self;       usename_text.layer.cornerRadius=3.0f;     usename_text.layer.masksToBounds=YES;     usename_text.layer.borderColor=[[UIColor whiteColor]CGColor];     ...

How to parse json data in UITableview using swift 3.0

import UIKit class ViewController : UIViewController , UITableViewDelegate , UITableViewDataSource {          @IBOutlet var table: UITableView !      //   var items: [String] = ["let's", "start", "Swift"]          var Namearray: [ String ] = []     var Email: [ String ] = []          override func viewDidLoad()     {         super . viewDidLoad ()                  table = UITableView (frame: UIScreen . main . bounds , style: UITableViewStyle . plain )         table . delegate       =   self         table . dataSource     =   self         table . register ( UITableViewCell . self , forCellReuseIdentifier: "cell" )         self . view . addSubvie...

How to make a simple tableview with iOS 8.2 and Swift 3.0

This is a step by step tutorial to add  UITableView  programmatically in  Swift . Create a new project     Open Xcode 8.2 and create a new project with "Single View Application" template. Create Table View Open default  ViewController.swift  file and add table view instance below class declaration import UIKit Add table view Delegate and DataSource Add  UITableViewDelegate  and  UITableViewDataSource  separated by comma after  UIViewController  in class declaration. class ViewController : UIViewController , UITableViewDelegate , UITableViewDataSource {          @IBOutlet var table: UITableView ! Add items as an Array of Strings and set some values in table view          var items: [ String ] = [ "let's" , "start" , "Swift" ]     override func viewDidLoad()     {         super . vi...