[Solved] How to zoom image by slide? [closed]

2 things to do: Configure the slider so that its min and max values are equal to the min and max zoom scale of your scroll view Use [imageScrollView setZoomScale:sender.value]; to update the zoom when the slider is changed Also, check the superview that your slider is added to. It shouldn’t be added to the … Read more

[Solved] How to make mobile apps for different OS [closed]

To make apps (mobile apps, I think you mean) for different OS’s(I think you mean the different OS’s on each phone),(assumption: that you’re coding it from scratch) you learn a programming language first, then proceed to learn how to make apps for a particular OS. Typically, you purchase a book (look online for good recommendations) … Read more

[Solved] How to show an image in a UICollection View cell while clicking that cell in swift ios?

Declare one instance of type IndexPath and maintain the cell status is it selected or not with it. Now use this array within cellForItemAt indexPath and didSelectItemAt indexPath like this. var selectedIndexPaths = IndexPath() func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: “Cell”, for: indexPath) as! PlaceCollectionViewCell //Your code … Read more

[Solved] How get the total sum of currency from a NSMutableArray [duplicate]

If the values are stored as NSNumber objects, you can use the collection operators. For example: NSArray *array = @[@1234.56, @2345.67]; NSNumber *sum = [array valueForKeyPath:@”@sum.self”]; If you want to format that sum nicely using NSNumberFormatter: NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.numberStyle = NSNumberFormatterDecimalStyle; NSString *result = [formatter stringFromNumber:sum]; NSLog(@”result = %@”, result); If … Read more

[Solved] How to convert data string to json object and string in iOS?

Use this NSString *str=@”{\”Data\”: [{\”ID\”:\”1\”,\”Name\”:\”Raj\”},{\”ID\”:\”2\”,\”Name\”:\”Rajneesh\”}]}”; NSMutableDictionary *dict=[NSJSONSerialization JSONObjectWithData:[str dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:nil]; NSMutableArray *dataArr=[dict valueForKey:@”Data”]; for (NSDictionary *userData in dataArr) { NSLog(@”Id:%@ Name:%@”,[userData valueForKey:@”ID”],[userData valueForKey:@”Name”]); } 0 solved How to convert data string to json object and string in iOS?

[Solved] iOS Error: Cannot convert value of type ‘UserModel’ to expected argument type ‘[String : Any]’

You have to convert your UserModel to [String : Any] type in order to save it on firebase. Try this: func convertUserModelToDictionary(user: UserModel) -> [String : Any] { let userData = [ “name” : user.name, // change these according to you model “email”: user.email, “user_id”: user.userId ] return userData } You can use this function … Read more

[Solved] How to build this layout in Swift

Best way is to use a UITableViewController. With that you can implement all the cells easily and efficiency. Then drag and drop an imageView on top of the tableView in the UITableViewController. You can place it right between the tableView and the Top to get what you want. solved How to build this layout in … Read more

[Solved] Unable to solve the error “[__NSCFBoolean length]: unrecognized selector sent to instance”

Your issue is with this line: NSURL *U1 =[NSURL URLWithString:[dict objectForKey:@”img”]]; The problem is caused by the fact that you assume: [dict objectForKey:@”img”] is returning an NSString when in fact it is returning an NSNumber representing a boolean value. You need to either figure out why the data in the dictionary is incorrect or you … Read more

[Solved] how to make Dyanamic NSDictonary in Swift

You can use swift Dictionary [String: AnyObject] this way instead of NSMutableDictionary. var data = [[String: AnuObject]]() for i in 0..<questionArr.count { data.append([“QuestionID”: questionArr[i], “AnswerID”: answerArr[i]]) } let dic = [ “QuizId” : “23566656”, “StartTime” : “23:30”, “EndTime” : “23:45”, “data” : data ] print(dic) 20 solved how to make Dyanamic NSDictonary in Swift

[Solved] Swift Xcode 6 baseball Counter

Use a property observer: var counter = 1 { didSet { if counter == 3 { self.outsCounter++ } } } Whenever counter gets changed, didSet will be called. (Also note that the equality operator is ==. = is for assignment.) 0 solved Swift Xcode 6 baseball Counter