Tag: ios4

如何结合UIScrollview和UIPagecontrol显示不同的视图?

我已经search和search这个教程,但没有一个是我正在寻找。 我试过苹果的样品,但它只是颜色,我不知道如何使它的意见。 我正在寻找的是一个页面显示页面控制的页面。 每次滚动视图页面我想要显示一个完全不同的视图与button,很像iPhone的主屏幕。 我发现下面的示例代码只与图像很好地工作,但我想修改为单独的视图。 请帮忙! 谢谢。 – (void)setupPage { scrollView.delegate = self; [self.scrollView setBackgroundColor:[UIColor clearColor]]; [scrollView setCanCancelContentTouches:NO]; scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite; scrollView.clipsToBounds = YES; scrollView.scrollEnabled = YES; scrollView.pagingEnabled = YES; NSUInteger nimages = 0; CGFloat cx = 0; for (; ; nimages++) { NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", (nimages + 1)]; UIImage *image = [UIImage […]

为iOS构build静态Graphviz库

我正在尝试为Graphviz构build静态库,以将它们包含在iOS应用程序中,但是我无法使其运行。 这是我迄今为止所做的,使用graphviz 2.28.0],Xcode 4.1,OSX 10.7,我的目标是iOS模拟器。 我find了Glen Low的configuration说明 ,并通过一些明智的猜测将这些更新为: ./configure –build=i486-apple-darwin –host=arm-apple-darwin9 –disable-dependency-tracking –enable-shared=no –enable-static=yes –enable-ltdl-install=no –enable-ltdl=no –enable-swig=no –enable-tcl=no –with-codegens=no –with-fontconfig=no –with-freetype2=no –with-ipsepcola=yes –with-libgd=no –with-quartz=yes –with-visio=yes –with-x=no –with-cgraph=no CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" CPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -E" CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2" CXXCPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -E" OBJC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" LD="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0" CXXCPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0" 这是有效的,但是这个“make”会运行一段时间,并且出错: Making all in gvpr CCLD mkdefs ld: warning: ignoring […]

如何检查iOS中SSL证书的安全性?

我想检查SSL SSL证书是否存在于URL中也想检查它的版本和validationtypes。 我创build了一个应用程序,我调用NSURLConnection委托方法通过服务器发送请求。 也使用“canAuthenticateAgainstProtectionSpace”方法,但是一旦连接build立,这个方法就不会被调用。 谁能告诉我如何做到这一点。

如何在xcode项目中重命名文件夹名称而不会破坏文件

在我的xcode项目中,我已经手动创build了一个名为"MyClasses"的文件夹,将新添加的文件/类放到这个文件夹中。 现在我有近30个这个文件夹中的课程。 当我重命名这个文件夹,这个文件夹中的所有文件都被擦除。 现在我需要将文件夹重命名为“ ViewControllerClasses ”。 但是我输了30个小时.m,xib文件。 [幸运我有一个副本和zip文件] 如何重新命名该文件夹不会损坏文件。 将其重命名为myviewcontrollerclasswes 当我改名

iOS /移动Safari浏览器仍然放大,而视口设置为用户可伸缩=否? 检查辅助function设置!

这个特定的移动Safari浏览器(看似不可能,但没有logging)的问题使我今天很长一段时间不知所措,当我想出来的时候,我正要在这里发表一个关于它的问题。 问题:虽然我设置了<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no;"/>我的iPad的networking应用程序仍然允许手动缩放(捏在浏览器中)。 – 但只在我的iPad上,而不在我的iPhone上。 此外,我会旋转设备之间的肖像风景模式,以检查具体的方向模式CSS代码,这给了奇怪的结果: 从风景到肖像的旋转没有任何问题,所有东西的大小和位置都是有意义的。 之后,从Portrait(肖像)旋转到Landscape(风景),视口保持与Portrait(纵向)模式一样宽。 它被放大(缩放)。我不得不手动缩小以返回到完整的图片/视口。 这应该是不可能的。

Xcode 4.1归档在组织者build立不显示图标

在iPad和iPhone上显示时,我的应用程序图标工作正常,但是在构build归档文件并创build归档文件后,没有显示任何图标。 有任何想法吗? 我环顾了几个论坛,还没有find解决办法。 我其实并不相信这对实际的分发部署有任何影响,因为.ipa肯定有捆绑的图标。 我已经直接加载到iTunes来validation。 见下面的截图,我已经有“图标文件”(CFBundleIconFile)和“图标文件”(CFBundleIconFiles)定义。

错误:在iPad上运行时无法启动

经过许多挫折后,终于有了一个应用程序运行在iPad上没有错误。 但它不运行。 它给出了以下错误。 我的应用程序在模拟器上运行,但不运行在iPad上,并给出了下面的错误。 我真的不知道为什么。 我去了所描述的文件夹结构的文件夹如下。 Products .DS_Store Debug-iphoneos .DS_Store sampleproject.app sampleproject.app.dSYM Debug-iphonesimulator .DS_Store sampleproject.app sampleproject.app.dSYM error: failed to launch '/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject' — No such file or directory (/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject)

在pushViewController之前设置视图控制器属性

在我的应用程序中,我添加了一个标签到一个视图,将它连接到一个sockets,但是当我第一次从另一个视图控制器分配这个sockets,然后调用pushViewController来显示它时什么也没有显示。 下面是推动显示标签的下一个视图之前的代码: 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.navigationController pushViewController:vc]; 在CustomViewController viewDidLoad方法中,我添加了这个指令来看看它是否可以工作 NSLog(@"Price=%@",lbl_price); // it actually prints out what was previously assigned 但它没有显示在标签! 任何想法为什么? 斯特凡

以编程方式在UIViewController中添加UINavigationController

我目前的观点如下: @interface BlogViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { UITableView *mainTableView; } @property (nonatomic, retain) UITableView *mainTableView; 正如你所看到的,它里面有一个UITableView,我加载了所有的数据。 但是,当我调用下面的函数: – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { SingleBlogViewController *viewController = [[SingleBlogViewController alloc] init]; [self.navigationController pushViewController:viewController animated:YES]; //[self presentModalViewController:viewController animated:YES]; [viewController release]; } 什么都没发生。 出于某种原因,我的UITableView里面我的UIViewController不推动视图。 这是因为它不是一个UITableViewController ? 我试图改变它,它仍然没有工作。 我在这里错过了什么?

使用jsonkit iOSparsingjson feed

我试图使用在这里find的JSONKIt https://github.com/johnezang/JSONKitparsing通过一个JSON饲料,并把它放到客观的C对象。 我是iOS新手,不知道从哪里开始。 有没有什么好的教程使用这个库?