讀取
1//1.讀取沙盒中plist檔案23
獲得沙盒根路徑
45 nsstring *home =nshomedirectory();67
拼接documents路徑
8documents"];
1011
檔案的全路徑
12login.plist"];
1415
//2.從plist中載入乙個字典出來
1617 nsdictionary *dict =[nsdictionary dictionarywithcontentsoffile:filepath];
1819
2021
//3.賦值
2223 self.username.text = dict[@"qq"
];24
25 self.password.text = dict[@"
pwd"];
儲存
1 nsdictionary *dict =@;89//2.儲存資料到沙盒的plist檔案中
1011
獲得沙盒根路徑
1213 nsstring *home =nshomedirectory();
1415
1617
拼接documents路徑
18documents"];
2021
2223
檔案的全路徑
24login.plist"];
2627
2829 [dict writetofile:filepath atomically:yes];
登入記住密碼
目標 1.記住密碼勾選,點登陸時,將賬號和密碼儲存到cookie,下次登陸自動顯示到表單內 2.不勾選,點登陸時候則清空之前儲存到cookie的值,下次登陸需要手動輸入 方法 通過存 取 刪cookie實現的 每次進入登入頁,先去讀取cookie,如果瀏覽器的cookie中有賬號資訊,就自動填充到登...
git記住賬號密碼
涉及到記住密碼的方式,只適用於http s 方式,記住密碼的幾種方式 https 方式每次都要輸入密碼,按照如下設定即可輸入一次就不用再手輸入密碼的困擾而且又享受 https 帶來的極速 按照以下設定記住密碼十五分鐘 git config global credential.helper cache...
Git記住賬號密碼
git儲存使用者名稱密碼的方式 1 設定記住密碼 預設15分鐘 git config global credential.helper cache git config credential.helper cache2 如果想自己設定時間,可以這樣做 git config credential.he...