Domanda

I want to use Three20's TTStyledTextLabel, in order to provide support for a label where pressing a link inside it will trigger safari to open it.

The problem is I'm afraid including the entire Three20 library is quite an overkill, since it has much to offer besides that capability.

Is there way to add just the TTStyledTextLabel functionality ? Or maybe an alternative solution ?

Thanks

È stato utile?

Soluzione

Three20 is somewhat modular, so you can just reuse what you need...

in case of TTStyledTextLabel, they belong to the Three20UI framework, which is quite a big beast and depends on: Three20Core, Three20Network, Three20Style, Three20UICommon, and Three20UINavigator. So you are facing a bit of complexity here...

Anyway, just in the case of TTStyledTextLabel, it derives from UIView (while TTLabel derives from TTView, so TTLabel has many more dependencies), and uses a few classes that belong to Three20Style -- and apparently nothing more complex...

so I think you could try and include those source files directly into your project, together with the Three20Style and see what happens... for sure there will be some dependencies somewhere in the implementation file of TTStyledTextLabel, but you could even be able to remove those, if they correspond to functionality you don't need.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top