Using the same code multiple times on iPhone
<p>I am new at iOS Development. Here i have problem with using the same code different times so how to implement oops concept in iPhone.</p>

<pre><code>sharebuttonpress = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
sharebuttonpress.frame = CGRectMake(330, 800, 145, 85);

[sharebuttonpress setBackgroundImage:[UIImage imageNamed:@"share_new.png"]
                        forState:UIControlStateNormal];
[sharebuttonpress addTarget:self action:@selector(sharePressed:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:sharebuttonpress];

[self.view bringSubviewToFront:sharebuttonpress];
</code></pre>
