Tag: ios4

如何将url图像存储在caching中然后在iphone中的imageview中显示

我直接在Imageview中打开URL图像,但我想将图像存储在caching中以供将来参考…帮我解决我的问题.. 提前致谢

selectvideo的UIImagePickerController可以防止MPMoviePlayerViewController实例工作

我有一个viewcontroller在一个popOver呈现UIImagePickerController 。 如果用户select一个video,然后closurespopup窗口,并移动到下一个“页面( 视图控制器 )”,并尝试使用该页面上的MPMoviePlayerViewController播放任何电影,他们不能这样做。 我相信发生的事情是在图像select器中显示的播放器被保留,因此这个新的video不能播放。 我已经正确地解散了popover,并且在尝试播放video时没有收到任何错误。 有没有人遇到过这样的事情? iOS SDK 4.2 iPad 。

iOS转换hex值

如何将hex值转换为表情符号图标,我有一个像下面的string NSString *myVal = @"1F61E"; 我怎么能转换这个文本显示为表情符号charrcaters? 我发现这个链接的价值请让我知道,我真的很困扰这个问题 Updated NSString *utf8String1 = @"1F61E"; NSString *a = [self convert:utf8String1]; NSLog(@"%@ &&&&&&&&&&&&&&&&&&&&&",a); -(NSString*)convert:(NSString*)decoded{ unichar unicodeValue = (unichar) strtol([decoded UTF8String], NULL, 16); char buffer[2]; int len = 1; if (unicodeValue > 127) { buffer[0] = (unicodeValue >> 8) & (1 << 8) – 1; buffer[1] = unicodeValue & (1 […]

iOS:Facebook评论插件移动不断重新加载

最近我一直试图将Facebook社交插件整合到iOS中的自定义UIWebView中,以评论网页。 我已经添加了Likebutton以及Comments插件。 以下是我加载到Web视图中的HTML代码: <html> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-href="http://www.heretheweb.com" data-send="false" data-layout="button_count" data-width="240" data-show-faces="false"></div> <div class="fb-comments" data-href="http://www.heretheweb.com" data-num-posts="5" data-width="470"></div> <body> </html> 星期一的第一个实现是在4个平台,包括模拟器(iOS 4和iOS 5),iPhone 3G iOS4和iPhone 4 iOS 5中获得成功。星期二,我继续开发这个,最后我用自定义UIWebView工作,没有任何问题前三名。 […]

禁用主页button

我知道这是以前被问过,但是我想禁用一个内部应用程序的主页button,将在iPad内部分发。 我已经在这里和谷歌search解决scheme,并希望阻止用户把应用程序的背景。 我已经看到了一个解决scheme似乎没有在iOS 4.0下工作,当按下主页button时,它再次打开应用程序。 我可以使用任何私人API来做这个看,因为这是一个内部的应用程序,不会由苹果公司审查的应用程序商店? 谢谢

animationUIButton背景图像

有没有办法使用一组图像animationUIButton背景图像视图? 我设法做到了imageView属性,但无法find一个等效的背景属性。 10倍

如何为UIButton添加操作

我是iPhone技术的新手。 请任何人告诉我如何为UIButton添加操作。 UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(0, 0, 100, 25); btn.backgroundColor = [UIColor clearColor]; [btn setTitle:@"Play" forState:UIControlStateNormal]; [btn addTarget:self action:(buttonClick:) forControlEvents:UIControlEventTouchUpInside]; btn.center = self.center; [self addSubview:btn];

如何从IOS中的字典数组中删除重复?

( { color = blue; }, { color = blue; }, { color = red; }, { color = white; } ) 这是一个字典数组,我必须从对应于键颜色的数组中删除重复的字典。

iOS4.1 SDK中的单个库中的重复符号

我正在开发一个iPhone应用程序。 我对Xcode不熟悉,请耐心等待。 我有iOS 4.1设备SDK。 当我在“Active …”下拉框中select“Simulator”时,我的应用程序将无错地编译并运行在iPhone模拟器中。 但是,当我在下拉框中select“设备”时,出现以下有关重复符号的链接器错误: Ld build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone normal armv6 cd /Users/isaacsutherland/fydp/PineCone/PineCone setenv IPHONEOS_DEPLOYMENT_TARGET 4.1 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -L/Users/isaacsutherland/fydp/PineCone/PineCone/../3rd/libGHUnitIPhone -F/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -filelist /Users/isaacsutherland/fydp/PineCone/PineCone/build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone.LinkFileList -dead_strip -all_load -ObjC -miphoneos-version-min=4.1 -framework Foundation -framework UIKit -framework CoreGraphics /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Core.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Network.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Style.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UI.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UINavigator.a -framework QuartzCore -framework CFNetwork -framework MobileCoreServices -framework SystemConfiguration -lz.1.2.3 […]

ios6 autorotation portraitupsidedown到肖像

请不要build议我在1个版本的ios 4.3-6.0上进行轮换是个不错的主意,因为我多次告诉过,并没有听我说。 在项目设置中,我已经设置了所有的接口方向来支持,只是可以肯定的。 现在我正在用iphone4testingios6。 从应用程序委托开始,它是一个代码,如下所示: mainController = [[MainViewController alloc] initWithNibName:nil bundle:nil]; navigationController=[[RotatingNavigationController alloc] initWithRootViewController:mainController]; navigationController.navigationBar.hidden =true; // ios: 4 and 5 //[window addSubview:navigationController.view]; //ios6: window.rootViewController = navigationController; [window makeKeyAndVisible]; 所以我做了2个自定义的类,在自动旋转的情况下推荐它们,并为他们解决了这个问题。 RotatingNavigationController是一个自定义的UINavigationController有一些难看的代码,但是我从这个论坛收集了这个部分,所以应该允许它发布它: @implementation RotatingNavigationController – (id)init { self = [super init]; if (self) { self.view.autoresizesSubviews = YES; [self.view setAutoresizingMask:(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth)]; } return self; } // […]