Re: Two Problems
Re: Two Problems
- Subject: Re: Two Problems
- From: Alex Zavatone <email@hidden>
- Date: Fri, 12 Feb 2016 11:06:58 -0500
1. What are you setting the delegate to? Self? If so, have you made sure to "conform" to that delegate in your class? Something like @interface CharlesViewController : UIViewController <UISearchBarDelegate> ??
If you don't do that, then the method you need isn't accessible through self and BLAMMO! Unrecognized selector sent to instance.
2. Are you including the asset lib in your bundle for the build?
Is the old name the same as the new name? Change the name of the graphic and see if it's even in the new build.
GL Charles.
Alex Zavatone.
On Feb 12, 2016, at 8:59 AM, Charles Jenkins wrote:
> PROBLEM 1:
>
> Is there anything new/tricky about the UISearchBar? I have placed one in my view, and dragged an IBOutlet to the companion source file. The result is an @IBOutlet weak var searchBar: UISearchBar!
>
> I added UISearchBarDelegate to my ViewController and implemented one method: func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String)
>
> My app works beautifully if I do NOT set searchBar.delegate = self in viewDidLoad(). But if I try to set that delegate to make search work, my app crashes on launch with an unhandled exception saying that an unrecognized selector was called.
>
> UISearchDelegate’s methods are all marked “optional," I think, but I’m wondering if in the latest version of iOS, one or more of them isn’t really optional anymore…?
>
> PROBLEM 2:
>
> I made a change to my launch image graphic and dragged the new version into the assets. The new image shows up there and in my LauchImage UI view, but there seems to be nothing I can do to get it onto a device!
>
> I performed these steps:
> Cleaned my project
> Cleaned my project build directory
> Quit Xcode
> Rebooted my computer
> Deleted the test app from my device—at this point, the old launch screen should not exist ANYWHERE
> Restarted Xcode
> Reconnected my device
> Started a debug session, which should have rebuilt and reinstalled a fresh, clean copy onto the device
> But somehow the old launch screen appears every time. Clearly there is a cache somewhere that is not cleaned out with the project or its build directory.
>
> What’s the secret to really getting rid of Xcode’s memory of an old launch image?
>
> --
>
> Charles
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Two Problems (From: Charles Jenkins <email@hidden>) |