<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Extending_Swift_Classes</id>
	<title>Extending Swift Classes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Extending_Swift_Classes"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Extending_Swift_Classes&amp;action=history"/>
	<updated>2026-05-18T11:39:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Extending_Swift_Classes&amp;diff=5151&amp;oldid=prev</id>
		<title>PeterHarding: Created page with &quot; Here&#039;s one which show you how to extend a fundamental class in a way which adds new bits to the Xcode interface  &lt;pre&gt; import UIKit  @IBDesignable class CustomImageView: UIIm...&quot;</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Extending_Swift_Classes&amp;diff=5151&amp;oldid=prev"/>
		<updated>2021-10-16T10:52:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; Here&amp;#039;s one which show you how to extend a fundamental class in a way which adds new bits to the Xcode interface  &amp;lt;pre&amp;gt; import UIKit  @IBDesignable class CustomImageView: UIIm...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Here&amp;#039;s one which show you how to extend a fundamental class in a way which adds new bits to the Xcode interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import UIKit&lt;br /&gt;
&lt;br /&gt;
@IBDesignable&lt;br /&gt;
class CustomImageView: UIImageView&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    @IBInspectable var borderWidth: CGFloat = 0.0&lt;br /&gt;
        {&lt;br /&gt;
        didSet {&lt;br /&gt;
            self.layer.borderWidth = borderWidth&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    @IBInspectable var borderColor: UIColor = UIColor.clear&lt;br /&gt;
        {&lt;br /&gt;
        didSet {&lt;br /&gt;
            self.layer.borderColor = borderColor.cgColor&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    override func prepareForInterfaceBuilder()&lt;br /&gt;
    {&lt;br /&gt;
        super.prepareForInterfaceBuilder()&lt;br /&gt;
    }&lt;br /&gt;
        &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Swift]]&lt;br /&gt;
[[Category:Swift 3]]&lt;br /&gt;
[[Category:IOS]]&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>