ios4

Translating a UIButton

南笙酒味 提交于 2019-12-25 18:03:44
问题 I would like to ask is it possible to translate the UIButton position? How? Anyone? 回答1: You can get the frame of the button using "frame" property. This returns a CGRect object which basically has your buttons x-coord, y-coord, width and height. Based on where you want to translate your button, calculate the new x-coord and y-coord. Then do the following: btnMyButton.frame = CGRectMake(oldx,oldy,width,height); [UIView beginAnimations:nil context:NULL]; [UIView setAnimationTransition

Translating a UIButton

巧了我就是萌 提交于 2019-12-25 18:03:01
问题 I would like to ask is it possible to translate the UIButton position? How? Anyone? 回答1: You can get the frame of the button using "frame" property. This returns a CGRect object which basically has your buttons x-coord, y-coord, width and height. Based on where you want to translate your button, calculate the new x-coord and y-coord. Then do the following: btnMyButton.frame = CGRectMake(oldx,oldy,width,height); [UIView beginAnimations:nil context:NULL]; [UIView setAnimationTransition

how to get current location inside a building iphone

做~自己de王妃 提交于 2019-12-25 17:03:29
问题 How is it possible to obtain the current location inside a building. I want to develop an application similar to this http://matadornetwork.com/goods/point-inside-indoor-map-application-for-the-iphone-and-android/ (on a smaller/less complicated scale) and wondering on the approach i should take. Are there any tutorials/examples/articles that would point me in the right direction? Thanks ... 回答1: Indoor Navigation System for Handheld Devices shows up a few possibilities how indoor navigation

iPhone: Is it possible to close the app rather than run in background when user clicks Home Button?

坚强是说给别人听的谎言 提交于 2019-12-25 17:03:07
问题 I have an app which crashes everytime when I resume it. I want that when user clicks Home button, the app should close rather than go in background mode. Is that possible? If yes, please let me know. If not, what could be the workaround so that my app does not crash when I resume it? Thanks! 回答1: In the plist, set YES to Application does not run in background key. When ur application is in background, due to memory insufficient, the views (and the objects released in viewDidUnload) might be

Difference between “terminating” an app , opening the “task switcher” and “auto lock”

旧时模样 提交于 2019-12-25 16:48:11
问题 I'm aware of the fact that the title of this thread is substandard. Anyhow, here's the issue I'm facing: My App displays a tableView with time-relevant content (content can get "old") and therefor updates on a regular basis by calling a web service and parsing its xml answer. so, in order to not display "out of date" information to the user, i want to hide the table and display a "content is being loaded"-label as soon as the app enters an inactive state. to do so, i react upon calls to -

Issue when resizing UIWebView using animation

喜夏-厌秋 提交于 2019-12-25 11:34:11
问题 I've been struggling with this for a while and have not found a solution. I'm resizing a UIWebView using animations through beginAnimations: and commitAnimations . All goes well, except for when the resizing tries to make the UIWebView larger. Let me make this clearer. Suppose the current frame of my UIWebView is (0, 0, 320, 300) . Then, I try to resize it to (0, 0, 320, 340) by using: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [self.webView setFrame:

Switching views for iphone application - is this the right way?

独自空忆成欢 提交于 2019-12-25 08:36:48
问题 After looking for many hours to find a working view switching code, I finally found a great tutorial on YouTube. It was exactly what I needed as I needed to switch views when buttons are pressed. I just wonder if the techniques used in that video are valid. The used code to switch screens is viewsViewController *second = [[viewsViewController alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:second animated:YES]; Where viewsViewController (or any class that is used

notifications doesn't show/ doesn't scheduled in Simulator but works in device Problem on Simulator 4.3?

爱⌒轻易说出口 提交于 2019-12-25 08:28:02
问题 I have Implemented a reminder application. [[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; int count = [[[UIApplication sharedApplication] scheduledLocalNotifications] count]; NSLog(@"count is %d",count); All are works fine notification alert raises when it's scheduled time arives. Suddenly today notifications are not showing . and they didn't scheduled notifications count also remains same even i set the notification, But when i exicuted the application in my

iOS : How to attach a multiple attachment file in one button using pickerview method?

情到浓时终转凉″ 提交于 2019-12-25 08:13:15
问题 I have a multiple file to attach inside the picker view. When user select that picker view item, they can click email button to attach the chosen file. How do I do so in my picker view? Here is my sample code. M File : -(void)pickerViewEmail:(UIPickerView *)pickerViewEmail didSelectRow:(NSInteger)row inComponent:(NSInteger)component { if ([[musicList objectAtIndex:row] isEqual:@"m1"]) { MFMailComposeViewController *pickerEmail = [[MFMailComposeViewController alloc] init]; pickerEmail

looping through subviews or a view

一世执手 提交于 2019-12-25 07:52:16
问题 What am I doing wrong? The views are set up in IB. There are 3 subviews of answersView. Each are UITextViews. But I get an answer that I can't set text on a UIView. Thanks in advance. int i; for (i=0; i<[[[self answersView]subviews]count]; i++) { UITextView *currentText = (UITextView *)[[self answersView] viewWithTag:i]; NSString *answer = [[self answersArray] objectAtIndex:i]; [currentText setText:answer]; } The error is: Terminating app due to uncaught exception 'NSInvalidArgumentException'