[Solved] I need advice on creating an app for uploading training videos [closed]

Backend Php will be better to use To post a video you need simple UI having browse or capture video features func createRequest (videoname : String!) -> NSURLRequest { print(“Path of video upload is:\(videoname)”) let param = [ “key” : “\(self.key)”, “secret” : “\( self.secret)”, “package_name” : p_name, “video” :”\(videoname)” ] let boundary = generateBoundaryString() … Read more

[Solved] Swift 4.2: what does the following declaration mean

It’s a tuple. Just like how an array has an index for an element, this variable can also be accessed using . operator followed by the index. _digest.0 _digest.1 However, if you want to access them using using a name rather than the index, that is also possible. (You can still access it using the … Read more

[Solved] Not able to assign text to UITextView

Providing more error details might help to solve your issue. But you can still solve it by checking few things-: 1) Check for UITextView outlet in storyboard-: 2) Check if you have given correct class to controller . In my case it’s UnderlineViewController check for yours. Your controller should have same class. 2.a) Go to … Read more

[Solved] cannot assign to value ‘colorTouched’ is a ‘let’ constant [closed]

You should be using == for comparison instead of = (which is assignment): @IBAction func buttonTouched(sender : UIButton) { var buttonTag : Int = sender.tag if let colorTouched = ButtonColor(rawValue: buttonTag) { if currentPlayer == .Computer { return } // note double equals if colorTouched == inputs[indexOfNextButtonToTouch] { … 1 solved cannot assign to value … Read more

[Solved] When I pass data from TableView to child PageViewController, it can go to next child

The problem here is that you are referencing two completely different objects. In viewDidLoad you create ThongTinBNPage2 viewController and then add it to the viewControllers property of the pageViewController. However, the objects stored in VCArr are two totally different viewControllers. Let’s think about it this way: When viewDidLoad is called you create viewController object #1 … Read more

[Solved] Table of integers right aligned

You are simply printing the array and the description method of Array will show the list of values separated by commas with the brackets. If you want any other output you need to generate it yourself. Replace your current print with the following: let line = table.map { String(format: “%4d”, $0)}.joined() print(line) This maps the … Read more

[Solved] How to Collect the numbers in Lebel text

Add this line totaleValue.text = “$\(Int(typPrice.text!.replacingOccurrences(of: “$”, with: “”))! + Int(fruitPrice.text!.replacingOccurrences(of: “$”, with: “”))!)” in end of typesegm and fruitSegm method like this. @IBAction func typesegm(_ sender: Any) { switch typesegm.selectedSegmentIndex { … } totaleValue.text = “$\(Int(typPrice.text!.replacingOccurrences(of: “$”, with: “”))! + Int(fruitPrice.text!.replacingOccurrences(of: “$”, with: “”))!)” } @IBAction func fruitSegm(_ sender: Any) { switch fruit.selectedSegmentIndex { … Read more

[Solved] swift properties setter not getting called

It looks to me like area is a computed property. Shouldn’t it be a read-only computed property? Seems to me that there are multiple triangles with a given area but different height/base values, so you can’t set the area in a meaningful way. var area: Double { get { // getter return 0.5 * base … Read more