ios4

Infinitely looping animation

不羁岁月 提交于 2020-01-01 03:12:36
问题 I am trying to create an infinitely looping animation but am having some trouble. I am using this line of code the make my view "throb" red but when I call this line it works but make my UI unresponsive. [UIView animateWithDuration:1.0f delay:0.0f options:(UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat) animations:^{ self.backgroundColor = [UIColor colorWithRed:0.5 green:0.0 blue:0.0 alpha:1.0]; } completion:nil]; My questions are: 1)is this the correct way to do this? 2)why

How to turn off NSZombieEnabled in Xcode 4

落花浮王杯 提交于 2020-01-01 02:43:08
问题 I have just migrated to Xcode 4 and i had zombie activated in Xcode 3 for my app. I used the following method: Go to Project -> Edit Active Executable Click Arguments Click + in the "Variables to be set in the environment" section Enter NSZombieEnabled in the Name column and YES in the Value column. Make sure the checkmark for the NSZombieEnabled entry is checked. Now i want to make sure it is off for my application but do not understand how to check/do that in XCODE4, anyone that can share

UIImageView scale from center using Animation Blocks

你。 提交于 2020-01-01 02:41:17
问题 I am using the following to scale image up but it's scaling from it's left top point, how can I make the scale from center [UIView animateWithDuration:duration delay:delay options:options animations:^{ myImageView.frame = frame; myImageView.alpha = alpha; } completion:^(BOOL finished) { } ]; 回答1: [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:(void (^)(void)) ^{ myImageView.transform=CGAffineTransformMakeScale(1.2, 1.2); } completion:^

Treasure hunt in Augmented Reality

白昼怎懂夜的黑 提交于 2020-01-01 00:48:34
问题 I'm looking for an augmented reality browser/toolkit/api that supports the following: Adding fixed 3d models such as a treasure-chest. Possible image recognition of this treasure-chest so the iPhone knows when you're looking at it. Specify altitude on a 3d model so it can be positioned on the ground or the second floor in an apartment building for example. It must have support for "migrating" it to a standalone app that can be published on the app store. The ability to customize the camera

Best way to do paging in UITableView

ぐ巨炮叔叔 提交于 2020-01-01 00:46:52
问题 I'm working on a real estate app. The app query a datafeed server after user fill in a form (min rooms, price and so on) and it gets a json string with specific key/value pairs (property name,property address,longitude/latitude,price,etc...). What I'm trying to do is allowing the user to browse the listing in a UITableView even if the feed contains a long list of items without having to overload the user iphone (the returned items count is not known before the query is done, so the app need

Xcode 4.1 Archive Build in organizer doesn't show icon

北城余情 提交于 2019-12-31 21:47:09
问题 My application icon's work fine when displaying on iPad and iPhone, however after I build for archive, and create the archive, there is no icon shown. Any ideas? I've looked around at several forums and haven't found a resolution. I actually don't believe this has any effect on the actual distribution deployment, as the .ipa definitely has the icons bundled with it. I've loaded it directly into iTunes to verify that. See screenshots below, I already have "Icon File" (CFBundleIconFile) and

Set view controllers property before pushViewController

对着背影说爱祢 提交于 2019-12-31 17:22:24
问题 In my app I've added a label to a view, connected it to an outlet but nothing shows up when I first assign this outlet from another view controller and then call pushViewController to display it. Here's the code before pushing next view that display the label: CustomViewController *vc = [[CustomViewController alloc] init]; vc.lbl_price.text = self.label_price.text; // lbl_price is defined as a property in CustomViewController and label_price is defined in current view controller [self

Underline text inside uitextview

橙三吉。 提交于 2019-12-31 06:56:06
问题 How can i underline text inside uitextview programmatically? 回答1: You can use NSAttributedString for this purpose. Following is link for the same - https://github.com/AliSoftware/Ali-Cocoa-Classes And you can refer this thread to check how to use NSAttributedString. How do you use NSAttributedString? 回答2: I used UIWebView instead of UITextView to solve this problem. NSString *contentHtml = [NSString stringWithFormat:@"<html><head></head><body><font color=\"white\" size=\"4\"><table width=\

UITextView member variable is always nil in my UIViewController

冷暖自知 提交于 2019-12-31 05:42:12
问题 In my nib, I have a UITextView component. In my UIViewController I have a UITextView member field and I have used IB to make sure that the two are connected (at least I think I did that by dragging from "Files Owner" and dropping it on the UITextView in IB and selecting my member variable). Now, when I update the text via setText: , the UITextView still remains blank. When I break into my code, the member variable (called textView ) is nil . So I am guessing I have not used IB correctly. How

UITextField inside an UIAlertView not working in iOS4.1 and works in 3.0

∥☆過路亽.° 提交于 2019-12-31 05:12:06
问题 I have a UITextField added to an UIAlerView (Kind of adding user to list with nick name, and nickname is asked by the alertview.). Thats work perfect in iOS3, But I cant type to that UITextField in iOS4.1. in iOS4.1 I do get focus to that textfield inside alertview, and keyboard appears, however typing doesn't work. Please help in this regard. 回答1: In iOS 4 UIAlertViews will automatically be moved and sized to avoid the keyboard if they contain any UITextFields in their subviews so you don't