这是一个非常简单的问题,我似乎无法找到答案.这该怎么做 :
CGRectMake(1, 3, size)
Run Code Online (Sandbox Code Playgroud)
要么
CGRectMake(pointB, size)
Run Code Online (Sandbox Code Playgroud)
要么
CGRectMake(pointB, size.width, size.height)
Run Code Online (Sandbox Code Playgroud)
代替
CGRectMake(self.someview.frame.origin.x, self.someview.frame.origin.y, self.someotherview.frame.size.width, self.someotherview.frame.size.height)
Run Code Online (Sandbox Code Playgroud)
?? 谢谢 !:)
编辑:
该方法CGRectmake需要CGFloat.我希望它采取CGSize和/或CGpoint作为方法的参数.
我正在一个项目,我需要创建一个自定义UINavigationBar和UITabBar.我的问题在于物品的颜色(浅色!).我不希望我的物品有任何色彩.我试图把它弄清楚颜色,但这只会让它消失(变得透明).
所以,总结一下,我有自己的酒吧项目图片,每个都包含自己特定的颜色.我已经读过,为了做我想做的事情,我必须继承我的UIBars,但我没有比这更多的信息.我应该在子类中修改什么来摆脱那种色彩约束?谢谢.
编辑:色调颜色不应用于项目,而是应用于栏(所以所有项目).所以我的问题是我需要特定颜色的物品
编辑2:好的,我想我明白了!解决方法是使用UIBarButtonItem方法:initWithCustomView:
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.bounds = CGRectMake( 0, 0, 26, 26);
[backBtn setImage:[UIImage imageNamed:@"BackBtn.png"] forState:UIControlStateNormal];
[backBtn addTarget:self.navigationController action:@selector(popViewControllerAnimated:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = item;
Run Code Online (Sandbox Code Playgroud)
但这只适用于UINavigationBar因为它需要UIBarButtonItem.UITabBar另一方面只采取UITabBarItem不符合的initWithCustomView.所以我还在那里泡菜......
我似乎只能下载已弃用的gdata版本的zip文件.我在哪里可以找到今天的版本(作为zip文件!)?谢谢
我已经配置了我的Parse接收api,如下所示:
[Parse setApplicationId:@"***" clientKey:@"***"];
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeSound];
Run Code Online (Sandbox Code Playgroud)
和
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
// Store the deviceToken in the current installation and save it to Parse.
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackground];
}
Run Code Online (Sandbox Code Playgroud)
然后在我的代码中,我添加了要订阅的频道,如下所示:
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
NSMutableArray *array = [NSMutableArray array];
for (Room *aRoom in rooms) {
NSString *strChannel = [NSString stringWithFormat:@"pr_%@", aRoom.roomId];
[array addObject:strChannel];
}
[currentInstallation setChannels:array];
Run Code Online (Sandbox Code Playgroud)
在我的例子中,频道是"pr_4".
当我在这个频道上推送一些东西时,解析仪表板告诉我没有人订阅频道"pr_4".我不明白我做错了什么.
ios ×2
objective-c ×2
cgrect ×1
cgrectmake ×1
channel ×1
gdata-api ×1
syntax ×1
tintcolor ×1
uitabbar ×1