Questions tagged [nsuinteger]

An Objective-C unsigned integer

An Objective-C unsigned integer

typedef unsigned long NSUInteger;

Reference: https://developer.apple.com/Library/ios/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/index.html#//apple_ref/c/tdef/NSUInteger

83 questions
0
votes
1 answer

cellForRowAtIndexPath (need to use one string and one integer values in the indexpath)

Dear all I am trying to display two different arrays in one tableView. I declared "years" array as strings and "amount" array as integers. years amount e.g: 2012, 2013 .... 155888, 151768 When I build7run the…
erguvani
  • 81
  • 1
  • 3
  • 7
0
votes
2 answers

inserting NSURL or integer in NSDictionary

i have a class 'book.h' in which i have declared Book.h NSInteger WeatherID; NSString *Description; NSURL *PictureURL; BookDetailview.h #import @class Book, XMLAppDelegate; @interface…
Ketan Shinde
  • 1,847
  • 4
  • 18
  • 38
0
votes
1 answer

Comparing NSInteger and NSUInteger

I have two variables that I need to compare, in order to check if an index exists in an array: indexPath.row is NSInteger [self arrayOfData].count is NSUInteger The problem is that they are of different types and when indexPath.row=-1 it gets…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
0
votes
2 answers

Use Variable outside Firebase Block

Hello everyone I'm using Firebase for my ios project ... I have a lot of trouble using the values of my variables outside of the Firebase blocks when I query the database. For example in this case I'm trying to get a number value from this query…
kAiN
  • 2,559
  • 1
  • 26
  • 54
0
votes
1 answer

Split NSData into three chunks - Ending up with MORE bytes that I started with

I have an iOS app that has video upload functionality. I need to upload video data to a server that has very specific upload requirements: max file size 15 MB and the file upload must be uploaded via chunks that do NOT exceed 5 MB. I am using…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
0
votes
1 answer

assign value from server to integer in objective -c

I am coming from swift background, I have a code in objective -c that take value from server and it takes correctly here is the code bellow. if (![message_expiration intValue]){ NSLog(@"Check the message expiration integer value"); …
Steven
  • 762
  • 1
  • 10
  • 27
0
votes
1 answer

IOS/Objective-C: Find Index of word in String

I am trying to return the index of a word in a string but can't figure out a way to handle case where it is not found. Following does not work because nil does not work. Have tried every combination of int, NSInteger, NSUInteger etc. but can't find…
zztop
  • 701
  • 1
  • 7
  • 20
0
votes
2 answers

Strange conversion from NSUInteger to floats

I have the following code: NSUInteger one = 1; CGPoint p = CGPointMake(-one, -one); NSLog(@"%@", NSStringFromCGPoint(p)); Its output: {4.29497e+09, 4.29497e+09} On the other hand: NSUInteger one = 1; NSLog(@"%i", -one); // prints -1 I know…
zoul
  • 102,279
  • 44
  • 260
  • 354
0
votes
1 answer

Questions about NSUinteger and int

I use JSONModel to capture data from json: @interface BBTCampusBus : JSONModel @property (strong, nonatomic) NSString * Name; @property (assign, nonatomic) NSUInteger Latitude; @property (assign, nonatomic) NSUInteger Longitude; @property…
Leo
  • 492
  • 1
  • 5
  • 15
0
votes
1 answer

Missing 64-Bit support while Uploading to AppStore

I was trying to validate and upload my app to app store.But it ended up with a error as Error Missing 64-bit I made changes by adding arm64 in valid architectures and standard architectures(armv7,arm64) - $(ARCHS_STANDARD) Build Active Architecture…
Vignesh
  • 35
  • 1
  • 8
0
votes
0 answers

Implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int')

Xcode reports me the following warning: Implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') The line which produces this warning is: NSUInteger radius = // some value; …
Michael
  • 32,527
  • 49
  • 210
  • 370
0
votes
1 answer

Can I change (unsigned) to (NSUInteger) or will it create problems?

I am a Jr Software Developer, can I just change the (unsigned) to (NSUInteger) or will to create problems later? - (unsigned)retainCount { return UINT_MAX; //denotes an object that cannot be released } warning said MKStoreManager.m:88:1:…
ootc
  • 13
  • 1
0
votes
1 answer

Is there a way to have a NSUInteger automatically display commas in iPhone?

Like if I had 29993 would there be a way to automatically have it be displayed as 29,993? Thanks
marty
  • 391
  • 1
  • 7
  • 15
0
votes
1 answer

Comparing NSIntegers (or int) to NSUInteger (or unsigned int)

I have a fairly large app (objective-c), I decided to turn on the "Sign Comparison" warnings. I now have almost 100 of them. Most of them are similar to this: if (recentSearches.count > indexPath.row) { //something } and the errors are similar…
Nathan
  • 139
  • 10
0
votes
1 answer

Get an error when I try to pass an element to an HTTP request

error: collection element of type nsuinteger aka unsigned long is not an objective c object I am trying to make an http request to stripe. This is what the params look like @"card": card.number, @"exp_month": card.expMonth, @"exp_year":…
madgrand
  • 121
  • 1
  • 8