It seems that the formatting can only happen in the final output. Doesn't
seem it can be used in a Double Variable. So if I wanted to create a
Double, to just hang on to this formatting, can't be done. Maybe you could
help me, and show me how it can be stored in a variable. I actually got
what I wanted, but I also would like to know how to store the value in a
Variable, preferably a Double. For what it's worth, thanks. (+1 : 29).
If you could help, with declaring a variable, while holding the formatted
number, that would be very good. I'd be very grateful. I'm working with
Android Studio, so learning Java is helping me allot. Not making any money,
just doing small Calculating Apps for my personal use. On my Samsung Galaxy
Note 4.
one problem i input 100 and it prints out 100.0 i input 5 and it prints out
5.0 how do i disable that decimal from appearing? so i just want to print
out 5 when i input 5 not 5.0
Подскажите:
Почему xcode ставит восклицательные знаки:
@IBOutlet var mileField: UITextField!
@IBOutlet var mileResult: UILabel!
Если их убрать то пишет ошибку (фотка ниже):
https://pp.vk.me/c621916/v621916202/260c4/Mm19PqOusnA.jpg
+Тимур Садердинов В Swift появился такой тип данных, как "Optional". Вы можете любой тип определить в optional, а это означает, что вы получаете или этот тип данных, или ничего.Чтобы было понятнее, вот пример:var number: Int?Это означает в переменной number может или быть значение "integer', или "nil".А ! (воскл. знак) означает, что мы получаем непосредственно значение этой переменной.На самом деле объяснить получилось не особо хорошо, но вы можете почитать об этот тут: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/OptionalChaining.html
Помогите пожалуйста, написал всё как в видео + учел комментарии ниже, но
приложение всё равно не запускается.
Ошибок в приложении нет. Скрин:
https://drive.google.com/file/d/0B84H9vSTBi8oWlFwM25scnlCSTA/view?usp=sharing
здравствуйте уроки правда классные )) , вы можете выставить как то эты
icons тут или отправить мне на mail почту пожалуйста , а то я на вашем
сайте не могу найти их
+Paul Solt I typed in exactly what you did (except changed NSDate.date()
to NSDate() based on comments below) but still receives three errors on the
variables for the calendar and birth date. The first one states that the
"'NSGregorianCalendar' was deprecated in iOS versio..." then gets cut off.
The second states, "Value of optional type 'NSCalendar?' not unwrapped; did
you mean to use '!' or '?'?". The last one states, "'date()' is
unavailable: use object construction 'NSDate()". ANY help would be much
appreciated. Thanks
+LongboardingTaco I had same error while following this video and this is how I did and got through.var calendar = NSCalendar(identifier : NSCalendarIdentifierGregorian)var birthDate = calendar?.dateFromComponents(dateComponents)var currentDate = NSDate()I think it will help you get through.
+LongboardingTaco You need to massage the code a bit, Apple changed it a lot since I posted this video.The API's changed a bit, so you have to use the ? for NSCalendar because it's optional, and that NSGregorian should tell you what to change it to, do a Option/Alt click on it for the rest of the message. It should now be something like: NSCalendarIdentifierGregorian
Hey Paul
I just started coding in version 6.3.1 and NSDate.date doesn't work for me.
I seems like .date isn't there anymore. Can you help me out? Thanks Mark
+Paul Solt
I've made an app called GratuiTip with a custom keypad. It's in the app
store. If you have any questions from the app let me know and I'll try to
make a video tutorial how to make it.