在顶部我有一个company id
然后我有client id
然后我有time stamp
然后我有数据,所以我想检查这个公司ID是否存在我如果公司ID不存在,我想在这家公司下添加新客户我想添加上面图像的新节点。我在这里做什么每次都添加一个新节点
LoginResponse *loginResponseObj = [Utililities loadLoginResponseObjectWithKey:LOGIN_RESPONSE_KEY_FOR_USERDEFAULT];
NSMutableDictionary *dataDict = [NSMutableDictionary dictionary];
[dataDict setValue:[NSNumber numberWithFloat:[LocationManager sharedManager].location.coordinate.latitude] forKey:@"lat"];
[dataDict setValue:[NSNumber numberWithFloat:[LocationManager sharedManager].location.coordinate.latitude] forKey:@"lng"];
NSMutableDictionary *timeStampDict = [NSMutableDictionary dictionary];
NSTimeInterval timeInSeconds = [[NSDate date] timeIntervalSince1970];
[timeStampDict setValue:dataDict forKey:[NSString stringWithFormat:@"%.0f",timeInSeconds]];
NSMutableDictionary *fcmDict = [NSMutableDictionary dictionary];
[fcmDict setValue:timeStampDict forKey:loginResponseObj.workerInfo.fcmId];
NSMutableDictionary *companyDict = [NSMutableDictionary dictionary];
[companyDict setValue:fcmDict forKey:[NSString stringWithFormat:@"%.0f",loginResponseObj.workerInfo.companyId]];
[[self.ref child:[NSString stringWithFormat:@"%.0f",loginResponseObj.workerInfo.companyId]]setValue:companyDict];
答案 0 :(得分:3)
我有类似的问题,在项目代码中找到:
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];
我刚把它删除了。
答案 1 :(得分:0)
使用以下逻辑更改隐藏导航后退按钮标题的方式: -
if(@available(iOS 11, *)) {
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateHighlighted];
} else {
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(-60, -60) forBarMetrics:UIBarMetricsDefault];
}
找到答案