3DTouch
此plist
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeShare</string>
<key>UIApplicationShortcutItemTitle</key>
<string>share</string>
<key>UIApplicationShortcutItemType</key>
<string>UITouchText.share</string>
<key>UIApplicationShortcutItemUserInfo</key>
<dict/>
<key>url</key>
<string>value1</string>
</dict>和在
-(void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler我想让shortcutItem.userInfo
if([shortcutItem.type isEqualToString:@"UITouchText.share"])
{
NSLog(@"%@",shortcutItem.userInfo[@"url"]);
}但返回的字典为空
发布于 2015-11-03 14:59:29
对不起,这张单子写错了。
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeShare</string>
<key>UIApplicationShortcutItemTitle</key>
<string>share</string>
<key>UIApplicationShortcutItemType</key>
<string>UITouchText.share</string>
<key>UIApplicationShortcutItemUserInfo</key>
<dict>
<key>url</key>
<string>value1</string>
</dict>
</dict>作为属性列表打开
这是错误的

这是真的

https://stackoverflow.com/questions/33492522
复制相似问题