ios4

How to convert UIView as UIImage?

纵然是瞬间 提交于 2019-12-29 07:19:12
问题 I am taking screenshot image from currentview.but i want to set frame….don't want to convert fullview as image.I gave frame size..but it takes always Image as fullview..any help please? CGRect rectt = CGRectMake(100, 150,150,200); UIGraphicsBeginImageContext(rectt.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageView *imgView = [[UIImageView alloc] initWithFrame:rectt]; 回答1:

what is the difference between strong (in LLVM) and retain( in GCC)?

為{幸葍}努か 提交于 2019-12-29 06:58:11
问题 what is the difference between strong (in LLVM compiler) and retain( in GCC compiler) ? 回答1: strong is a new feature in iOS 5 Automatic Reference Counting (ARC) which behave the same as retain in iOS 4. Referenced Article. Also, check out this other SO question: @property definitions with ARC: strong or retain? 回答2: strong is a new keyword that was introduced along with arc (automatic reference counting). There are a bazillion articles about it if you search google, including this one http:/

How to hide folders created in Document Directory in ios?

南笙酒味 提交于 2019-12-29 06:55:07
问题 I have created some PDF files programatically, which i am storing into the devices memory using the following code >>>> NSString *fileName = [NSString stringWithFormat:@"SampleTextFile.pdf",strFinalString]; NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *saveDirectory = [path objectAtIndex:0]; NSString *saveFileName = fileName; NSString *documentPath = [saveDirectory stringByAppendingPathComponent:saveFileName]; I can see the file in

how to change Application language on run time using Two Button in iphone SDK?

為{幸葍}努か 提交于 2019-12-29 06:32:29
问题 i am building up a project in ios platform and want to use two language in this application and also want . the user can change the language on Runtime suppose we can take two language button button 1 for english and button 2 for german and the user can change the application language at any time by using these button . any help or tutorials Thanks in advance 回答1: Assuming that you have created localizations for English and German, your app will use the language selected in Settings (this is

UIFileSharingEnabled has no effect

守給你的承諾、 提交于 2019-12-29 06:25:16
问题 I've added UIFileSharingEnabled to the .plist. Per suggestions, I have: removed the app and redeployed it several times attempted to disconnect after redeploying I have not been able to get the app visible in the File Sharing section in iTunes. On another app, this works flawlessly. The app where it doesn't work has a bit exotic internals (an easily portable game; as such, it has its own mainloop, it doesn't have a main nib, ...). The app where it does work is pretty much standard deal. Also,

Making UILabel touchable

天涯浪子 提交于 2019-12-29 04:36:32
问题 I have a UILabel and I would like to make it react to a touch. I tried putting a button on top of the label, thanks to this I could interact with the button. However, the button cannot be fully transparent, right? I could set an alpha of the button to 0,02, but it is still visible on by background. How to solve this? Maybe I could set the properties in some other way to make them fully invisible? Or is there some other solution? 回答1: First, why not just use a button and set the button title

iPhone app uses 150 MB memory and still no low memory warning!

假如想象 提交于 2019-12-29 04:04:07
问题 I have a questionary application, navigation based which I create and push my tableviews eachtime from a nib. there is no leakage and in instruments live bytes seems around 2-3 MB. I tested in real device (jailbroken IOS4 iPhone), when I go through deep in the navigation (around 200 page pushes) I can see that memory usage goes upto 150 MB! when I navigate back to root then they are all freed, but isnt this a weird behavior? (around 800 KB for each nib view and no big data or images in it)

Check Update Available App Store

隐身守侯 提交于 2019-12-29 03:40:22
问题 Anyone known if exist some way to check if exist one update available on App Store?? I want notify to user the new updates on my application begins... Thanks 回答1: Just use ATAppUpdater, it is 1 line, thread-safe and fast. It also have delegate methods if you would like to track user action. Here is an example: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[ATAppUpdater sharedUpdater] showUpdateWithConfirmation]; // 1 line of

Push Notification Badge Count Not Updating

放肆的年华 提交于 2019-12-29 01:16:53
问题 this is my code for apple push notification, when the application is running and notification coming i am incrementing the badge count and getting desired result when i click home button, on app icon. but when i am not running my application and notification comes, it didn't auto increment badge count and remains to only 1. the value 1 is coming from server. can any one point out where i am doing wrong. thanks in advance. - (BOOL)application:(UIApplication *)application

Push Notification Badge Count Not Updating

混江龙づ霸主 提交于 2019-12-29 01:16:51
问题 this is my code for apple push notification, when the application is running and notification coming i am incrementing the badge count and getting desired result when i click home button, on app icon. but when i am not running my application and notification comes, it didn't auto increment badge count and remains to only 1. the value 1 is coming from server. can any one point out where i am doing wrong. thanks in advance. - (BOOL)application:(UIApplication *)application