Questions tagged [foundation]

Foundation is a framework written in Objective-C that implements many useful classes and functions. For the responsive front-end framework Zurb Foundation, please use the tag [zurb-foundation].

Foundation is a framework written in Objective-C that implements many useful classes and functions. Foundation is used by almost any Objective-C application, as it provides memory management and other runtime features, without the need to use the Objective-C runtime API directly.


References

Related Topics

Separate Topics

This topic is often confused with:

941 questions
-1
votes
1 answer

Rounding an Infinite Number?

This question is related to an earlier question however I am receiving an infinite number not related to a divided by 0 problem. For example, the code below prints 4.5300000000000002 in the console but is flagged as .isInfinate and therefore I…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
-1
votes
2 answers

Is the following a safe use of dispatch_set_target_queue()?

What I want to do is create an indirect queue targeting the main queue. dispatch_queue_t myQueue = dispatch_queue_create("com.mydomain.my-main-queue", NULL); dispatch_set_target_queue(myQueue, dispatch_get_main_queue()); My ultimate goal is to use…
-1
votes
2 answers

How to express current time in words

I am able to get current time, Now I want to output it in words. let date = Date() let calendar = Calendar.current let hour = calendar.component(.hour, from: date) let minutes = calendar.component(.minute, from: date) let seconds =…
Swift Developer
  • 247
  • 2
  • 18
-1
votes
2 answers

iOS10 + Xcode8 documentDirectory weird behavior

It seems the documentDirectory in Xcode8/Swift3/iOS10, in a framework, on iOS seems unwritable. API's used / tried: FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) NSSearchPathForDirectoriesInDomains(.documentDirectory,…
Antwan van Houdt
  • 6,989
  • 1
  • 29
  • 52
-1
votes
4 answers

Ambiguity regarding the usage of NSObject?

I am new to ios development and started coding with swift,and I have some basic question regarding NSOject and i couldn't find any satisfactory answer. My question is, If we are creating a new class ,is it mandatory that the class must inherit from…
Legolas
  • 805
  • 1
  • 11
  • 24
-1
votes
2 answers

When subclassing NSObject, what difference does it make to import "Foundation.h" or "NSObject.h"?

Here we see the same subclass of NSObject each using a different #import statement. What difference, if any, does this make for my subclass? What difference, if any, does this make for my final compiled program? #import
Aya Aboud
  • 371
  • 2
  • 4
  • 16
-1
votes
1 answer

Changing value of allocated NSObject after iteration with for loop

I'm doing the challenges for BNR ObjC guide if anyone is wondering what this is from. I made a custom class that is called WCDStockHolding that has attributes 'name', 'currentPrice', 'purchasePrice', and 'numberOfShares'. I am asking the user to…
cdipaolo
  • 229
  • 1
  • 2
  • 10
-1
votes
2 answers

Core Foundation to Foundation and vice-versa

I just learned about the __bridge cast today and I am not understanding the implications behind it: Why would Apple create Two frameworks that are so close to one another that they are toll-free interchangeable. What benefit does one gain by using…
-1
votes
1 answer

List filtering by date range ( sharepoint foundation 2010 )

How can I filter a list by date range in SharePoint 2010 Foundation? I found out how in SharePoint2010, but in the Foundation version I haven't the Filter Web Parts and can't find where to download them (if it is possible). Thank you in advance.
MicheleT
  • 101
  • 3
  • 8
-1
votes
1 answer

dateByAddingTimeInterval: is giving incorrect result

I'm trying to use dateByAddingTimeInterval: to add 8 days to my current date but it gives me a weird result. This is the code I'm using: -(void)requestForGetEPGChannelsProgramsSucceed:(id)jsonResponse andEpgId:(NSString *)epgId forDate:(NSDate…
user2328703
  • 227
  • 2
  • 11
-1
votes
3 answers

Regular expressions in Objective-C to search a string starting with #

My code is below,but it doesn't work. NSString *regex = @"^#"; NSPredicate *regextest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; if ([regextest evaluateWithObject:secondHalfString] == YES) { …
Tom H
  • 517
  • 1
  • 6
  • 10
-2
votes
1 answer

Difference between FloatingPointRoundingRule.down and FloatingPointRoundingRule.towardsZero in Foundation

FloatingPointRoundingRule.down and FloatingPointRoundingRule.towardsZero both are rounded towards zero(rounded to nearest Int value). Then what is difference between them and at which scenario what type should be used?
iroh
  • 23
  • 5
-2
votes
1 answer

Does On demand resource really persisted after quitting the app?

I have created the NSBundleResourceRequest object as instance member of the class. if i quit the app the request object is deallocatted. According to the apple document if the request object is deallocated the downloaded asset's control is taken…
iroh
  • 23
  • 5
-2
votes
1 answer

Java like function getLeastSignificantBits() & getMostSignificantBits in Swift?

I would like to know a function/method to get LeastSignificantBits & MostSignificantBits in Swift for the Foundation.UUID().uuidstring which is a randomly generated Unique Universal Identifier and also know the opposite, to create a…
ajinkya
  • 9
  • 3
-2
votes
1 answer

How to get inout to an NSString?

How to get input from an NSString as scanf ("%@", &str); doesn't work?
Matoe
  • 2,742
  • 6
  • 33
  • 52
1 2 3
62
63