iphone Slider example
<p>I'm making an slider application. For that, I have written the following code, but when I press on build and go option then the slider bar is not moving. It gives an error in the .h and .m file.</p>

<p><strong>SliderAppDelegate.h</strong></p>

<pre><code>#import &lt;UIKit/UIKit.h&gt;

@interface SliderAppDelegate : NSObject &lt;UIApplicationDelegate&gt;
{
    UIWindow *window;
    IBOutlet UISlider *slider;
    IBOutlet UILabel *labelTxt;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) UILabel *labelTxt;

-(IBAction)changeSlider:(id)sender   ;
@end
</code></pre>

<hr>

<p><strong>SliderAppDelegate.m</strong></p>

<pre><code>#import "SliderAppDelegate.h"

@implementation SliderAppDelegate

@synthesize window,labelTxt ;

- (void)applicationDidFinishLaunching:(UIApplication *)application
{   
    [window makeKeyAndVisible];
}

-(IBAction)changeSlider:(id)sender 
{
    labelTxt .text= [[NSString alloc] initWithFormat:@" Value %d ", (int)slider.value];
}

- (void)dealloc
{
    [window release];
    [label.Txt release];
    [super dealloc];
}

@end
</code></pre>

<p>Are there any problems in this code?</p>
