Post

Replies

Boosts

Views

Activity

UISearchBar placeHolder and leftView is dissappearing.
I have UISearchBar, when I run from xCode placeholder and icon is working well but when i run from simulator or testflight placeholder and icon is dissappear. How can I solve it? Here my code: view: private lazy var searchBar: UISearchBar = { let view = UISearchBar() view.delegate = self view.barTintColor = UIColor.clear view.backgroundColor = UIColor.clear view.isTranslucent = true view.setBackgroundImage(UIImage(), for: .any, barMetrics: .default) view.placeholder = "Search" return view }() setup method: view.addSubview(searchBar) view.addSubview(collectionView) searchBar.snp.makeConstraints { make in make.top.equalTo(view.safeAreaLayoutGuide).inset(17) make.leading.trailing.equalToSuperview().inset(6) make.height.equalTo(40) }
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
405
Aug ’24
How can I fix action button after update Xcode12?
My action buttons stopped working after Xcode update (Xcode 12). When I clicked the buttons, I saw that the functions did not working (like there is no button in there). I could not understand why. How can I fix these functions? Here my action button function: 	 @objc func addAction(sender: UIButton) { 			 let indexPath = IndexPath(row: sender.tag, section: 0) 			 let cell = tableView.cellForRow(at: indexPath) as! customCell 			 cell.count += 1 			 cell.countBasketLabel.text = "x\(cell.count)" 			 			 let detailGelen = detailsModel[indexPath.row] 			 selectedItemName.append(detailGelen.itemDetailName!) 			 selectedItemPrice.append(detailGelen.itemDetailPrice!) 			 UserDefaults.standard.set(selectedItemName, forKey: "urunadi") 			 UserDefaults.standard.set(selectedItemPrice, forKey: "urunfiyat") 			 tableView.reloadData() 	 } Here my button code:	 let addButton: UIButton = { let button = UIButton(type: .system) button.setImage(UIImage(named: "add"), for: .normal) button.tintColor = .black button.layer.cornerRadius = 5 button.addTarget(self, action: #selector(testdetail.addAction(sender:)), for: .touchUpInside) return button }()
21
0
8.8k
Sep ’20
How can I solve (Guideline 5.2.1) ?
Hi,I have problem about Legal - Intellectual Property. I made lyrics app for IOS. I use Genius API which is totally free to use. I use that api and reach some datas about songs and singers after that I make simple request to genius.com to get songs lyrics for showing in my app. (that song lyrics link also get from genuis api). Everybody can reach that lyrics from website, I just want to make it more easy and simple but in return I get this:Your app includes third-party lyrics and/or sheet music without the necessary authorization. The use of third-party copyrighted materials requires documented evidence of your right to use such content in your app.So, how can I solve this issue? If I add some source from genius.com in my application, can solve it? (I can give a link or navigate to link etc.)Regards.
10
0
3.2k
Apr ’20