This question already has answers here:
Detecting current iPhone input language
(6 answers)
Closed 7 years ago.
I was able to retrieve the list of installed keyboards through NSUserDefaults and AppleKeyboards, but I wasn't able to find out which one is the current user selected. Anyway to do so programmatically?
Try using this:
[UITextInputMode currentInputMode].primaryLanguage
If you use NSLog, you will see something like fr-FR, pt-BR etc...
Related
This question already has answers here:
Swift: print() vs println() vs NSLog()
(6 answers)
Closed 7 years ago.
What is the difference between NSLog(), println, and print?
From my experience and understanding, they all write in the Console/Debugging area but why is there the change in Swift v1.2 and v2.0?
If you use 2.0 then print will offer more functionality, but they are still the same thing. Please refer to the documentation to see the added functionality.
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/
Also don't use NSLog if you are using Swift
This question already has an answer here:
Is there any way to get the tamper-proof date and time on iPhone?
(1 answer)
Closed 8 years ago.
So, I'm developing an app that is based on the time, but with NSDate an user can easily hack the application by changing system time of the device. So I might want to use a better method for retrieving time.
How can I do this? Is there an easy way to retrieve time from internet?
Checkout this Google Library: https://github.com/jbenet/ios-ntp
After the library is set up you can use it with the following line:
[NSDate networkDate];
A similar question has also been answered here: Get Date and Time from Apple Server
This question already has answers here:
Cocoa-Touch: How do I see if two NSDates are in the same day?
(12 answers)
Closed 8 years ago.
I would like to make an app where you get coins ever day.
How can i make a timer or something else who ckecks, wether the user already got the coin?
Can anyone please help me?
Store the time that the user got the coin in the user defaults.
Every time the application enter from the background check if the timeToGetAnotherCoin has passed.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to detect the current keyboard input method on the iPhone?
Get writing language of “uitextview” iphone?
How to get the current editing language of a UITextView object? I mean the CURRENT language of a UITextView keyboard
I don't have other words to say but the question editor requires some more text here lol
Do you mean the language used by the device that's accessing the textview? Couldn't you just get the language of the system? You could use:
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
(Not my code, found it here: Getting current device language in iOS? )
Edit: actually this is what you're after UITextInputMode you can read the docs here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextInputMode_Class/Reference/Reference.html
This question already has answers here:
What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?
(6 answers)
Closed 8 years ago.
It may be a noob question but is this something to do with my webhost. i go to say www.dgimages.co.nz in the address bar and it brings up the page then the address bar adds /#!/ or on certain html i.e contact.html it adds it to the end like contact.html#!/
Help, is this normal?
This is because you have certain JS functions on the site, which can be linked with a #, and in your case this is how the menus are working.