Posts

Post not yet marked as solved
6 Replies
If you are sure you set Light there and it causes error on archiving, or it has no effect for LaunchScreen.storyboard, please share your experience. I used 'Light' as value for 'Appearance' key... I was able to validate archive successfully Setting value 'Light' doesn't affected LaunchScreen... Launch Screen was changing appearance and status bar style with dark mode...
Post not yet marked as solved
6 Replies
You have not clarified what you have entered on what key... I have entered 'UIUserInterfaceStyle' as a key but it automatically replaced by 'Appearance'... Please explain what should I do now...
Post not yet marked as solved
6 Replies
When I try typing UIUserInterfaceStyle it doesn't get autocompleted... When I enter it, It itself automatically switches to key called 'Appearance' somehow and then Appearance doesn't have Light / Dark or anything... I even read Apple Documentation it mentions UIUserInterfaceStyle but When I enter it is info.plist it doesn't get accepted...
Post not yet marked as solved
7 Replies
@Claude31 I used solution similar to OOPer has given above and it solved the problem...
Post marked as solved
3 Replies
Hi, I create UILabel by Adding it as a subview to header... Here is my code for Header at '0'... override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) - UICollectionReusableView { let reusableview = UICollectionReusableView() if (kind == UICollectionView.elementKindSectionHeader) { print("section \(indexPath.section)") if indexPath.section == 0 { let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: collectionViewFirstHeaderFooterReuseIdentifier, for: indexPath) headerView.backgroundColor = .clear let headerUILabelText = UILabel() headerUILabelText.textAlignment = .left headerUILabelText.font = UIFont.systemFont(ofSize: 20, weight: .bold) headerUILabelText.numberOfLines = 0 headerUILabelText.text = "Your Roll Number is \(NumberInteger). Your Exam Numbers are \(examNumbers(number: "\(NumberInteger)"))" headerUILabelText.textColor = .darkGray headerUILabelText.lineBreakMode = .byTruncatingTail headerView.addSubview(headerUILabelText) headerUILabelText.setMargins() headerUILabelText.isHidden = false headerUILabelText.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ headerUILabelText.leadingAnchor.constraint(equalTo: headerView.leadingAnchor), headerUILabelText.trailingAnchor.constraint(equalTo: headerView.trailingAnchor), headerUILabelText.centerXAnchor.constraint(equalTo: headerView.centerXAnchor), headerUILabelText.centerYAnchor.constraint(equalTo: headerView.centerYAnchor), headerUILabelText.topAnchor.constraint(equalTo: headerView.topAnchor), headerUILabelText.rightAnchor.constraint(equalTo: headerView.rightAnchor), headerUILabelText.bottomAnchor.constraint(equalTo: headerView.bottomAnchor), headerUILabelText.leftAnchor.constraint(equalTo: headerView.leftAnchor), headerUILabelText.widthAnchor.constraint(equalToConstant: headerView.frame.width), headerUILabelText.heightAnchor.constraint(equalToConstant: headerView.frame.height) ]) return headerView } else if indexPath.section == 1 { let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: collectionViewSecondHeaderFooterReuseIdentifier, for: indexPath) return headerView } else { return reusableview } }
Post not yet marked as solved
7 Replies
I was able to solve it myself... Thanks Again...
Post not yet marked as solved
7 Replies
I used your suggestion of 'if (sourceSection == destSection)' but user is able to still drag from section 1 to 0... Also used your code for else statement but it never gets called. I think answer should be Collection View 'Section' Specific. As per requirement user should be able to only move cells within sections i.e. Section 1 cells should be rearranged within section 1 only..
Post not yet marked as solved
2 Replies
Can you showcase exact code with right options as I am not getting any help from autocomplete or online search...
Post not yet marked as solved
8 Replies
Code you shared creates three columns for every size. I want to increase column in numbers when size increases.I used your idea fixed cell size but it creates unmanageable space between two horizontal cells at certain sizes...
Post not yet marked as solved
8 Replies
I have used your suggestion of fixed cell size for width and height, but at odd view sizes minimum spacing between two horizontal cells is unpredicatble and which is more than 10... How to manage this spacing between a cell while increasing horizontal cell count?
Post not yet marked as solved
8 Replies
Is there any specific threshold/benchmark that I can code UICollectionView Cell for window width sizes for macOS e.g. As you know device-width in iOS and iPadOS ecosystem when you load your UI...
Post not yet marked as solved
8 Replies
Actually I want to vary cell numbers horizontally once screen size increases. My cells are square in size so if size dimensions increases horizontal cell should increase in numbers to fit the area.
Post marked as solved
4 Replies
I tried moving 'let keyWindow' to 'SizeForItem' but it did not helped... it is still 'keyWindow?.bounds.size' is nil...I even tried printing 'keyWindow?.bounds.size' from 'ViewDidLoad' and it is still nil...Is it a Simulator problem?