注意 负数 0 浮点数
浮点数
数组 初始化。page = 1开始,刷新,应移除数组中所有元素。
列表中有删除,如删除消息,订单等,数据源应为 NSMutableArray
NSDictionary * dic = [NSDictionary dictionaryWithObjectsAndKeys:(nonnull id), ..., nil];
dictionaryWithObjectsAndKeys方法在遇到nil对象时,会以为是最终的结束标志。于是dictionary中只放了之前的对象就初始化结束了,而且不管编译和运行中都不会报错,这样的bug显然很隐蔽。
在 商品页面价格可 按实际显示。 但 结算页面是 按照 取两位小数的,参考淘宝。
在提交支付宝时,订单参数异常。要检查传入是否正确,注意 后台支付直接返回了 浮点数。如1.96999... 其实应为1.97。
登录注册页经常使用presentViewController跳转 。但是注意presentViewController和 [self.navigationController pushViewController 都使用时,
比如 PassLoginViewController
```
RegisterVController *vc=[RegisterVController new];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:vc animated:YES completion:nil];
```
②
```
CodeLoginViewController *vc=[CodeLoginViewController new];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:vc animated:YES completion:nil];
```
开始使用presentViewController:vc跳转到 CodeLoginViewController,但是在CodeLoginViewController里面就不能跳转(因为这个使用原来的逻辑,没改动)
```
//填充资料
PerformanceInfoViewController *vc = [[PerformanceInfoViewController alloc]initWithNibName:NSStringFromClass([PerformanceInfoViewController class]) bundle:[NSBundle mainBundle]];
[self.navigationControllerpushViewController:vcanimated:YES];
```
所以②改为
```
CodeLoginViewController *vc=[CodeLoginViewController new];
[self.navigationController pushViewController:vc animated:YES];
```
注意 CodeLoginViewController与RegisterVController的跳转
```
RegisterVController *vc=[RegisterVController new];
[self.navigationController pushViewController:vc animated:YES];
```
```
- (void)backBtnAction:(UIButton*)sender{
if (self.presentingViewController) {
[self dismissViewControllerAnimated:YES completion:nil];
}else{
NSArray*viewControllers = [self.navigationControllerviewControllers];
[self.navigationControllerpopToViewController:viewControllers[viewControllers.count-3]animated:YES];
}
}
```