+ 5
Can anybody post a simple program for IOS device.
Kindly anyone post a sample program for IOS device.
3 Respostas
+ 3
import UIKit
var zaka = [0.0,1.8,2.9,3.4]
zaka.append(7)
print(zaka)
zaka.removeAtIndex(2) /// 2 in array is 1.8
zaka.count
for var i=0;i<4;i=i+1
{
print(arc4random_uniform(2)) //// create uniform random numbers
}
var h = zaka.sort() //// array.sort() /// sort means near value
print (h)
for var value1 in zaka
{
print(value1) /// only for reading not we can write using this l loop
}
let pi=3.4 //// constant values
for var (i, value1) in zaka.enumerate() ///reading and writing \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\using loop
{
zaka[i]
print(zaka[i])
}
if var num=Int(tf.text!) // if variable is sussfull has value than do \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\this
// chaish sa bâchna ka lia
var dictda=[“1”:”Zaka”;”2”: “Daniyal”]
dicta[“3”] =“Hammed” ///// adding like append
+ 3
Thanks for your posts
+ 1
some simple code text