UIImageView* imageView1 = [[UIImageView alloc]init];
[self.view addSubview:imageView1];
NSData *data = [@"1231321" dataUsingEncoding:NSASCIIStringEncoding];
CIFilter *filter = [CIFilter filterWithName:@"CICode128BarcodeGenerator"];
[filter setValue:data forKey:@"inputMessage"];
[filter setValue:[NSNumber numberWithInteger:0] forKey:@"inputQuietSpace"];
UIImage* iamge = [UIImage imageWithCIImage:filter.outputImage];
imageView1.frame = CGRectMake(0, 80, iamge.size.width, iamge.size.height);
imageView1.image =iamge;