Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIButtonサブクラスを作成しましたが、ボタンが持つ画像のパスを取得する必要があります。書くことはできますが、アイデアself.pathはありませんか?self.imageView.image.path
self.path
self.imageView.image.path
私はあなたが道を得ることができるとは思わない。UIImageのAPIドキュメントを見ると、ファイルを使用してインスタンス化できますが、インスタンスが作成されるまでにファイルはなくなり、NSDataが残っています。
これはあまり効率的ではありませんが、イメージの作成に使用された候補ファイルがわかっている場合は、NSDataをハッシュして、UIButtonのUIImageのNSDataのハッシュと比較できますか?