修改程序图标标示数字
1.修改自身应用图标标示数字:
[UIApplication
sharedApplication].applicationIconBadgeNumber = 10;
2. 修改其他应用图标标示数字:
ios7.0下的sdk
Use class-dump to
dump the headers for
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/iTunesStore.framework/iTunesStore
涉及的头文件
ISOperation-ISAuthentication.h
ISOperation-ISLoadSoftwareMapAdditions.h
ISOperation-ISLoadURLBagAdditions.h
ISOperation.h
ISOperationDelegate-Protocol.h
ISOperationQueue.h
ISSetApplicationBadgeOperation.h
You may have to edit ISOperation.h:
1. Change the #import "NSOperation.h" to #import
2. Remove the "" in the first part of the interface. So you're just left with "id _delegate;"
Then copy these 3 files into a "Headers" dir inside of the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/iTunesStore.framework dir.
You can now add the iTunesStore framework to your xcode project. Just point to the dir above.
Now add "#import " to your code and, for your convenience, here's an example-function ready for use:
CODE:
2. 修改其他应用图标标示数字:
涉及的头文件
ISOperation-ISAuthentication.h
ISOperation-ISLoadSoftwareMapAdditio
ISOperation-ISLoadURLBagAdditions.h
ISOperation.h
ISOperationDelegate-Protocol.h
ISOperationQueue.h
ISSetApplicationBadgeOpe
You may have to edit ISOperation.h:
1. Change the #import "NSOperation.h" to #import
2. Remove the "" in the first part of the interface. So you're just left with "id _delegate;"
Then copy these 3 files into a "Headers" dir inside of the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/iTunesStore.framework dir.
You can now add the iTunesStore framework to your xcode project. Just point to the dir above.
Now add "#import " to your code and, for your convenience, here's an example-function ready for use:
CODE:
- ISSetApplicationBadgeOpe
ration *sbadge = [[ISSetApplicationBadgeOpe ration alloc] init]; -
-
-
[sbadge setBundleIdentifier:bundleIdentifier]; -
[sbadge setBadgeValue:[NSString stringWithFormat:@"%d",number]]; -
[sbadge run]; -
[sbadge release];
网络上志同道合,我们一起学习网络安全,一起进步,QQ群:694839022