Post

Replies

Boosts

Views

Activity

Reply to Scroll two collection view at one time, bug IOS 15
To fully answer the question, I added a tableView with 2 rows, each containing a CollectionView. It still works OK, even at first scroll, as the screen capture illustrates: Code for creating the collections: import UIKit class TestViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var collection1: UICollectionView! @IBOutlet weak var collection2: UICollectionView! func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 2 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "CellItemForCollection", for: indexPath) let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) layout.itemSize = CGSize(width: 50, height: 50) let collectionView = UICollectionView(frame: CGRect(x: 0, y: 0, width: 260, height: 120), collectionViewLayout: layout) collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "MyCell") collectionView.backgroundColor = UIColor.clear collectionView.dataSource = self collectionView.delegate = self collectionView.tag = 10 + indexPath.row // 10 or 11 cell.contentView.addSubview(collectionView) return cell } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 20 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { var id = "" switch collectionView.tag { case 1 : id = "Standard1" case 2 : id = "Standard2" case 10, 11: id = "MyCell" default: break } let cell = collectionView.dequeueReusableCell(withReuseIdentifier: id, for: indexPath) for v in cell.contentView.subviews { v.removeFromSuperview() } switch collectionView.tag { case 1 : cell.backgroundColor = .red case 2 : cell.backgroundColor = .systemYellow case 10: cell.backgroundColor = .systemBlue case 11: cell.backgroundColor = .systemGreen default: break } let label = UITextView(frame: CGRect(x: 5, y: 4, width: 30, height: 20)) label.text = String(indexPath .row) cell.contentView.addSubview(label) return cell } override func viewDidLoad() { super.viewDidLoad() collection1.tag = 1 // The top collections (out of TableView) collection2.tag = 2 } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’21
Reply to Are Cryptocurrency Rewards Allowed ?
Effectively, what you want to do is apparently not allowed. The fact that someone may have succeeded (temporarily ?) to turn around the rules is by no means a guarantee that you will be allowed to do it. Nevertheless, if you try, you should provide detailed argument to the reviewer to explain why you think it is within the guidelines.
Nov ’21
Reply to Viewcontroller layout in iOS 15
Is it on simulator or on device ? Which device / simulator for iOS 14 and iOS 15 ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Scroll two collection view at one time, bug IOS 15
Re reading your post : under first and should be partially hidden under screen What do you mean by "under screen" ? Do you mean below screen limit ? under first Collection ? I tested both cases, without replicating the problem.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Scroll two collection view at one time, bug IOS 15
To fully answer the question, I added a tableView with 2 rows, each containing a CollectionView. It still works OK, even at first scroll, as the screen capture illustrates: Code for creating the collections: import UIKit class TestViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var collection1: UICollectionView! @IBOutlet weak var collection2: UICollectionView! func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 2 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "CellItemForCollection", for: indexPath) let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) layout.itemSize = CGSize(width: 50, height: 50) let collectionView = UICollectionView(frame: CGRect(x: 0, y: 0, width: 260, height: 120), collectionViewLayout: layout) collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "MyCell") collectionView.backgroundColor = UIColor.clear collectionView.dataSource = self collectionView.delegate = self collectionView.tag = 10 + indexPath.row // 10 or 11 cell.contentView.addSubview(collectionView) return cell } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 20 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { var id = "" switch collectionView.tag { case 1 : id = "Standard1" case 2 : id = "Standard2" case 10, 11: id = "MyCell" default: break } let cell = collectionView.dequeueReusableCell(withReuseIdentifier: id, for: indexPath) for v in cell.contentView.subviews { v.removeFromSuperview() } switch collectionView.tag { case 1 : cell.backgroundColor = .red case 2 : cell.backgroundColor = .systemYellow case 10: cell.backgroundColor = .systemBlue case 11: cell.backgroundColor = .systemGreen default: break } let label = UITextView(frame: CGRect(x: 5, y: 4, width: 30, height: 20)) label.text = String(indexPath .row) cell.contentView.addSubview(label) return cell } override func viewDidLoad() { super.viewDidLoad() collection1.tag = 1 // The top collections (out of TableView) collection2.tag = 2 } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Swift playgrounds 4
IMHO it will come soon. But few know the exact date, and those who know cannot tell. So we have all to be a bit more patient… and wait for it to be brought by Nicholas or Santa Claus.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Are Cryptocurrency Rewards Allowed ?
Effectively, what you want to do is apparently not allowed. The fact that someone may have succeeded (temporarily ?) to turn around the rules is by no means a guarantee that you will be allowed to do it. Nevertheless, if you try, you should provide detailed argument to the reviewer to explain why you think it is within the guidelines.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Swift playground
Please explain precisely the problem you have using playgrounds. There are a lot of tutorials in Apple books. Did you read them ?
Replies
Boosts
Views
Activity
Nov ’21
Reply to Age for signing apps
AFAIK, it is (legally) 18. You'll get more detailed information here: https://developer.apple.com/forums/thread/85235
Replies
Boosts
Views
Activity
Nov ’21
Reply to UITextView's text (or attributedText) is erasing right after ViewController was dismissing modally
You dismiss the VC, not the textView, isn't it ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to UITextView's text (or attributedText) is erasing right after ViewController was dismissing modally
Then you empty the TextView and you reload it with the lazy scrollView. Could you try to remove lazy attribute.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode simulator
when I open simulator it open with the old code and doesn't refresh with the new code Did you recompile the app ? Otherwise, nothing changes in simulator. Or do you speak of Preview instead of simulator ?
Replies
Boosts
Views
Activity
Nov ’21
Reply to UITextView's text (or attributedText) is erasing right after ViewController was dismissing modally
the text is erased at the beginning, and after that controller goes away That just means that iOS first dismisses the subviews and their content before dismissing the controller. If that's a problem, you could hide the TextView before dismissing the controller.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Apple, surely it is possible to block some of these these spam posts?
It seems that either fix is working or that deletion by moderator is much faster. In any case, much better so.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Refresh tabItem view
Where do you use view(request ? Could you show the complete code ? I suppose you would need a stat var to keep track of tab, but need to see complete code.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode simulator does not show the same as Preview
Could you some some example code and the parts that are skipped by simulator ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Nobody can find my app
What do you get when you search for Bills ? May be the list is too long and they present only the most popular apps ? AFAIK, search is not using keywords. In any case, you should ask the question to Apple's support.
Replies
Boosts
Views
Activity
Nov ’21