그래서 내 iOS 앱에는 다음과 같이 설계된 메뉴가 있습니다.
이미지는 다음 코드로 생성됩니다.
cell.imageCell?.image = menuItems[indexPath.row].image
cell.imageCell.image = cell.imageCell.image?.withRenderingMode(.alwaysTemplate)
cell.imageCell.tintColor = MenuTableViewController.fontColor
cell.imageCell.backgroundColor = UIColor.clear
This code is placed in the tableview cellForRowAt function. Now all the different viewcontrollers(HomeViewController, InfoViewController etc...) have no access at all to the menu controller and thus are not able to change the color of the image and nowhere else am I changing the color of these images. Now when I press one of the tabs that don't use any Alerts or modal views like home or info, the images stay perfectly fine, however when I press on Weather or excursions which download a json file with URLSession dataTask and display an alert telling to please wait, the images turn grey like the following:
I'm not sure how this is even possible that one viewcontroller can change another viewcontrollers subviews. Thanks in advance -Jorge
아마도 아이콘이 흐리게 표시되는 것 같습니다. 이미지 템플릿 또는 세트를 사용하지 마십시오 tintAdjustmentMode
하는 normal
아이콘 페이딩을 중지 할 수 있습니다. 일반적으로 경고 또는 모달 컨트롤러를 표시하면 발생합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다