小编Vla*_*mir的帖子

在Xcode中链接错误

我在添加libxml2.2.dylib文件后收到此错误

 Linking /Users/Biranchi/Desktop/Funmovies TabBarController/build/Debug-iphonesimulator/funmovies.app/funmovies (1 error)
 in /Developer/Platforms/iphoneOS.platform/Developer/SDKs/iphoneOS3.0.sdk/lib/libobjc.A.dylib, missing required architecture i386 in file

Command /XCode3.1.4/platforms/iphoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Run Code Online (Sandbox Code Playgroud)

这个错误是由于什么?

所有建议表示赞赏.

谢谢Biranchi

xcode linker objective-c

13
推荐指数
4
解决办法
6万
查看次数

UIView的addSubview真的保留了视图吗?

我遇到了一个似乎暗示不同的情况.在下面的代码片段中,如果我删除行:self.navigationController = nav,根控制器的视图将不会显示,向我建议addSubview可能实际上不会保留视图,否则建议.任何的想法?

- (void)applicationDidFinishLaunching:(UIApplication *)application {   
   self.testViewController = [[TestViewController alloc] initWithNibName:@"TestView" bundle:  [NSBundle mainBundle]];

   UINavigationController *nav = [[UINavigationController alloc]  initWithRootViewController:self.testViewController];

   self.navigationController = nav;  //<-- if this line is removed, test view won't show up

   [window addSubview:nav.view];

   [nav release];
}
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch uikit

12
推荐指数
1
解决办法
2万
查看次数

在没有临时文件的情况下解压缩NSData

我发现了一些允许在iPhone上解压缩文件的libs(LiteZipZipArchive).但是它们都需要输入作为文件.是否有一个库允许直接解压缩包含zip存档数据的NSData而不将其写入临时文件?
我试图采用上面提到的libs,但到目前为止没有成功.

iphone objective-c unzip nsdata

12
推荐指数
1
解决办法
6540
查看次数

Objective c布尔值

我想知道目标c中的以下值之间的差异:

TRUE(uppercase) - true(lowercase) - yes
FALSE(uppercase) - false(lowercase) - no
Run Code Online (Sandbox Code Playgroud)

它们在IDE中的颜色不同,在使用不同的布尔值时会出现不同的情况吗?

谢谢

boolean objective-c

11
推荐指数
1
解决办法
1万
查看次数

什么是NSConcreteValue以及如何提取其值?

我有一个库,我接收NSConcreteValue,我不知道如何处理它.我知道我应该得到的对象是一个布尔值,所以我如何解除真正的价值呢?

iphone cocoa-touch

11
推荐指数
1
解决办法
6762
查看次数

如果两个n位数相乘,则结果将是最大位长

我想知道如果有两个n位二进制数相乘,是否有任何公式或方法可以找出更多的最大位.我搜索了很多,但无法在任何地方找到答案.

math binary

11
推荐指数
3
解决办法
2万
查看次数

Blowfish objective-c实现

您建议使用Blowfish的什么目标实施?(或者我可能只是错过了一些可用的标准实现?)

iphone blowfish objective-c

8
推荐指数
2
解决办法
3272
查看次数

UIViewController IBOutlets是零

我有一个带有两个标签的UIViewController类和一个设置为IBOutlets的UIImageView,我在xib中连接了这个插座,我已经仔细检查它们是否正确连接,但是当我在调试器中检查它们的值时它们是0x0所以我不能以编程方式更改它们.关于我可能做错的任何想法.

继承人我的代码的头文件:

#import <UIKit/UIKit.h>


@interface PlateDetailViewController : UIViewController {

     IBOutlet UIImageView *image;
     IBOutlet UILabel *price;
     IBOutlet UILabel *description;

}

@property (nonatomic, retain)IBOutlet UIImageView *image;

@property (nonatomic, retain)IBOutlet UILabel *price;

@property (nonatomic, retain)IBOutlet UILabel *description;


@end
Run Code Online (Sandbox Code Playgroud)

iphone xib uiviewcontroller uiimageview

8
推荐指数
1
解决办法
5429
查看次数

如何将字符串作为UIButton的标记传递

标记值是整数:

UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
[button setTitle:addressField forState:UIControlStateNormal];
[button addTarget:self action:@selector(pickTheQuiz:) forControlEvents:UIControlEventTouchUpInside];
button.tag=1;//or what other integer value, i need to put a string value
Run Code Online (Sandbox Code Playgroud)

在接收方法中:

-(void)pickTheQuiz:(id)sender{           
    NSLog(@"The part number is:%i",((UIControl*)sender).tag);//i need to receive a string value instead of numeric value
}
Run Code Online (Sandbox Code Playgroud)

objective-c ios

8
推荐指数
2
解决办法
1万
查看次数

从UITapGestureRecognizer中排除子视图

我有一个子视图和一个超级视图.superview附加了一个UITapGestureRecognizer.

UIView *superview = [[UIView alloc] initWithFrame:CGRectMake:(0, 0, 320, 480);
UIView *subview = [[UIView alloc] initWithFrame:CGRectMake:(100, 100, 100, 100);
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc] initWithTarget: self action: @selector(handleTap);
superview.userInteractionEnabled = YES;
subview.userInteractionEnabled = NO;
[superview addGestureRecognizer:recognizer];
[self addSubview:superview];
[superview addSubview:subview];
Run Code Online (Sandbox Code Playgroud)

识别器也会在子视图中触发,有没有办法从子视图中排除识别器?



我知道之前已经问过这个问题,但我没有找到一个好的答案.

cocoa-touch objective-c ios

8
推荐指数
1
解决办法
4109
查看次数