ios6

iOS 6 - UIWebView loadHTMLString not working properly

前提是你 提交于 2019-12-18 13:02:02
问题 If anyone experienced the issue below, please let me know if you were able to find a fix. I've spent a couple of days trying to come up with a solution, but no luck so far. I'm using XCode 4.5 with iOS 6 SDK Golden Master. Basically, my application reads and HTML file and hands its contents to a web view for rendering. NSString *path = [[NSBundle mainBundle] pathForResource:@"filename" ofType:@"html"]; NSString *html = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding

Not a PNG filCommand copypng emitted errors but did not return a nonzero exit code to indicate failure

蓝咒 提交于 2019-12-18 12:48:13
问题 I am getting following error while adding images the running the project on iPad. It worked fine on simulator with all images but on iPad its running but showing no images. CopyPNGFile /Users/user/Library/Developer/Xcode/DerivedData/RImageGallery-cmwaittvclhwgxfpcoarddipyliv/Build/Products/Debug-iphoneos/RImageGallery.app/Default.png PhotoBrowserDemo/Default.png cd /Users/user/Desktop/Demo setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:

iOS 6 - Facebook sharing procedure fails with error “The proxied app is not already installed”

谁都会走 提交于 2019-12-18 12:48:06
问题 Though, there is such a question Facebook Error (7) iOS 6 it's already closed without any answer! While obtaining an access to user's facebook account I've got an error: error is: Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The proxied app is not already installed." UserInfo=0xa260270 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The proxied app is not already installed.} I'm performing a request like

Xcode Storyboard displaying the new iPhone 5 screen size?

白昼怎懂夜的黑 提交于 2019-12-18 12:46:46
问题 I have the latest version of Xcode. In one of my projects I noticed that the views for the iPhone were the new iPhone 5 screen sizes. I like it but is there a way to switch back to the smaller screen size? Not everyone has the iPhone 5. 回答1: Also, when your building your interface, you'll see a small icon that lets you quickly switch between 4" and 3.5" screens. It's the rectangular icon on the left. It toggles back and forth between phone sizes. 回答2: There's a size property in the attributes

iOS 6 Passbook: Open Passbook app from my app

蓝咒 提交于 2019-12-18 12:42:20
问题 I am building an application related to the Passbook app. Basically I am generating a boarding pass for a flight ticket and adding it to Passbook. That part is working fine. But, I want to open the Passbook app from my app to see the pass details. I have seen that Apple has removed the URL scheme options. How can I achieve this? 回答1: I had the same problem, it worked well with the emulator but crashed on the device. 1 - Double check the Entitlements 2 - I used this when the _pass is already

Auto layout with custom UITableViewCell

为君一笑 提交于 2019-12-18 12:33:20
问题 How do I get the contents of a custom UITableViewCell to shift and resize using Auto Layout? To make the issue more clear, I've assigned the contentView of my custom cell to have a light gray background color. To reduce this to the smallest problem possible, my custom cell has only one UIImageView named ratingImageView that shows some number of yellow stars; three such cells can be seen in the image below. My ratingImageView has only 4 constraints; (1) width =81, (2) height =40, (3) align

How to force UICollectionView with fewer items to scroll?

泪湿孤枕 提交于 2019-12-18 12:22:42
问题 I am working with a UICollectionView that displays fewer items than necessary to fill the whole screen. With this setting, the view simply does not scroll (move and bounce), when I add like 20 items it works. How can I force the collection view to scroll, without enough items to fill the screen? (source: bytolution.com) Thanks for your help! BTW I already tried to set the contentSize (e.g. to {320 , 1000}) but it still does not work. 回答1: Try to set alwaysBounceVertical property to YES : self

detecting the change of content of UITextField when the change is not made by the keyboard

我是研究僧i 提交于 2019-12-18 12:16:53
问题 I have a UIButton and a UITextField ,when the button is pressed the textfield's content string will be equal to: This is a test string , how can I detect that this text field has changed its contents in this case? p.s. UITextField's delegate methods do not work in such case UPDATE: I want this behavior to be on iOS 6+ devices. 回答1: Maybe simple key-value observing will work? [textField addObserver:self forKeyPath:@"text" options:0 context:nil]; - (void)observeValueForKeyPath:(NSString *

What are good alternatives to UITextAlignmentCenter in iOS 6?

孤街醉人 提交于 2019-12-18 11:47:30
问题 UITextAlignmentCenter seems to be deprecated in iOS 6. What are my alternatives? 回答1: For IOS 6 you should use NSTextAlignmentCenter instead of UITextAlignmentCenter : button.titleLabel.textAlignment = NSTextAlignmentCenter; Source And if you want backward compatibiliy to IOS 5 also you can do this, #ifdef __IPHONE_6_0 # define ALIGN_CENTER NSTextAlignmentCenter #else # define ALIGN_CENTER UITextAlignmentCenter #endif 回答2: #ifdef __IPHONE_6_0 # define ALIGN_CENTER NSTextAlignmentCenter #else

How does iOS 6 UIWebView state restoration work?

会有一股神秘感。 提交于 2019-12-18 11:35:45
问题 According the docs: In iOS 6 and later, if you assign a value to this view’s restorationIdentifier property, it attempts to preserve its URL history, the scaling and scrolling positions for each page, and information about which page is currently being viewed. During restoration, the view restores these values so that the web content appears just as it did before. I'm doing all that, but nothing is happening. And even if I manually save and restore the URL the user was looking at previously,