小编use*_*268的帖子

如何将NSString值@"3.45"转换为float?

如何将NSString值@"3.45"转换为float.3.45

float fCost = [[NSDecimalNumber decimalNumberWithString:@"3.45"]floatValue] ;
Run Code Online (Sandbox Code Playgroud)

objective-c

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

如何写#ifdef中的条件.用于分期.在目标c

我需要在此调用Staging中添加一个条件..

在这种情况下如何做到这一点.

  #ifdef MYAPP_PRODUCTION
        buildMode = @"Production";
    #else

    #ifdef MYAPP_RELEASE
        buildMode = @"Release";
    #else MYAPP_DEBUG
       buildMode = @"Debug";
    #endif
    #endif
Run Code Online (Sandbox Code Playgroud)

另一个是MyApp_Staging需要包含在这个if条件中如何做到这一点?

objective-c preprocessor-directive

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

帮我解决错误_deflateInit2_

ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphonesimulator'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Debug-iphoneos'
ld: warning: directory not found for option '-L/Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/../ZXingWidget/build/Release-iphoneos'
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneDevice.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/photon/Desktop/Walg-19-aug/WalgreensIPAD_1.0.3/iPad/Walgreens/libOmnitureAppMeasurement-iPhoneSimulator_4_0_GM.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_deflateInit2_", referenced from:
      -[ASIDataCompressor setupStream] in ASIDataCompressor.o
  "_deflateEnd", referenced from:
      -[ASIDataCompressor …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ipad

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

可变和不可变之间有什么区别

什么是可变和不可变的差异

喜欢

NSString和NSMutableString.

NSArray和NSMutableArray.

NSDictionary和NSMutableDictionary.

可变对象和另一个对象[我猜不可变]有什么区别?

@提前致谢.

iphone objective-c

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

iOS中的色轮或颜色选择器

如何在iOS中制作色轮,颜色选择器或色调选择器以在iPad上使用.

这是一个类似于我想要的颜色选择器的示例图片.

在此输入图像描述

@All先谢谢.

iphone colors objective-c ipad ios

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

自定义UIImagePickerController的后退按钮?

在此输入图像描述如何在UIImagePickerController中自定义"相册"后退导航按钮为"照片"?

我试试运气

任何想法如何自定义相册后退导航按钮.

UIImagePickerController *albumPicker = [[UIImagePickerController alloc]init];
[albumPicker setDelegate:self];

[albumPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
popOverController = [[UIPopoverController alloc]initWithContentViewController:albumPicker];

[popOverController presentPopoverFromRect:CGRectMake(0,0,templatePhotoPlaceholderView.frame.size.height/2,templatePhotoPlaceholderView.frame.size.height) inView:templatePhotoPlaceholderView permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
[popOverController setPopoverContentSize:CGSizeMake(320, 480)];
[albumPicker release];
Run Code Online (Sandbox Code Playgroud)

我想自定义相册照片已显示在图像和保存照片到照片如何做到这一点我尝试它不适合我

iphone objective-c ipad

7
推荐指数
1
解决办法
5884
查看次数

如何从pickerview更改颜色选择的拾取值?

pickerArray = [[NSArray arrayWithObjects:@"20", @"40", @"60",@"80", @"100", @"120", @"140", @"160", @"180", @"200",nil] retain];

 - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {

        //On Selecting the component row
        if (component == 0) {

        } else if (component == 1) {

            [quantityPickerDelegate didChangeLabelText:[pickerArray objectAtIndex:row]];// delegate passing the selected value
             pickerLabel.textColor = [UIColor colorWithRed:0.0745 green:0.357 blue:1.0 alpha:1];

    }   


- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {

    //Picker view content added
    pickerLabel = [[UILabel alloc] init];
    pickerLabel.backgroundColor=[UIColor clearColor];

    if (component == 0)
    {
        [pickerLabel setText:@"Total"];
        pickerLabel.frame …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c uipickerview ipad

3
推荐指数
1
解决办法
4972
查看次数

内存管理问题

我在函数[Method.]中分配了对象.

内部解析器方法.

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName 
  namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName 
    attributes:(NSDictionary *)attributeDict{

    Information *aInfo = [[Information alloc] init];

    if([elementName isEqualToString:@"data"]){

        aInfo.strStoreId = [attributeDict valueForKey:@"storeid"];
        [arrayList addObject:aInfo];
    } else if ([ActionType isEqualToString:@"action"]) {

        if([elementName isEqualToString:@"data"]) {
            aInfo.strStoreId = [attributeDict valueForKey:@"storeid"];
           [arrayList addObject:aInfo];
        }

    }
}
Run Code Online (Sandbox Code Playgroud)

在这种情况下如何管理内存问题?

iphone objective-c

0
推荐指数
1
解决办法
94
查看次数