mac的基础有关问题求教
mac的基础问题求教
本帖最后由 huayy 于 2012-11-06 17:05:36 编辑 我是xcode开发的初学者,公司想做一个客户端,想利用webview嵌套公司的手机版网站,然后发布到app上去,不知道这样是否可行,苹果公司会不会通过呢?
还有个问题,原本在国庆节我已经将上面的东西搞定了,当然是对照网上的hello world教程做的,国庆节回来后,升级了xcode,怎么弄都不行了。。
求大牛指点。。
代码
viewcontroller.h
se//
// ViewController.h
// test
//
// Created by xxx on 12-9-19.
// Copyright (c) 2012年 xxx. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *lz_web;
@property (weak, nonatomic) IBOutlet UIStepper *lz_jia;
@property (weak, nonatomic) IBOutlet UISlider *lz_hdt;
@property (weak, nonatomic) IBOutlet UIImageView *lz_image;
@property (weak, nonatomic) IBOutlet UITextField *lz_textbox;
@property (weak, nonatomic) IBOutlet UILabel *lz_label;
@property (weak, nonatomic) IBOutlet UIButton *lz_button;
-(IBAction)helloworld:(id)sender;
-(IBAction)hd:(id)sender;
@end
//
// ViewController.m
// test
//
// Created by xxx on 12-9-19.
// Copyright (c) 2012年 xxx. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize lz_web;
@synthesize lz_jia;
@synthesize lz_hdt;
@synthesize lz_image;
@synthesize lz_textbox;
@synthesize lz_label;
@synthesize lz_button;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[self setLz_button:nil];
[self setLz_label:nil];
[self setLz_textbox:nil];
[self setLz_image:nil];
[self setLz_hdt:nil];
[self setLz_jia:nil];
[self setLz_web:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
}
-(IBAction)helloworld:(id)sender
{
lz_web.userInteractionEnabled = true;
// navigate to google
[lz_web loadRequest:[[NSURLRequest alloc] initWithURL:[[NSURL alloc] initWithString:@"http://www.google.com"]]];
lz_label.text=@"ccc";
}
-(IBAction)hd:(id)sender
{
lz_image.alpha=lz_hdt.value;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@end
不知道是不是语法,还是什么变了,谢谢。
------最佳解决方案--------------------
推荐你使用phonegap,关于能不能通过审核,这和是不是web应用无关
具体见这篇文章 PhoneGap应用开发对策:如何通过苹果审核?
------其他解决方案--------------------
本帖最后由 huayy 于 2012-11-06 17:05:36 编辑 我是xcode开发的初学者,公司想做一个客户端,想利用webview嵌套公司的手机版网站,然后发布到app上去,不知道这样是否可行,苹果公司会不会通过呢?
还有个问题,原本在国庆节我已经将上面的东西搞定了,当然是对照网上的hello world教程做的,国庆节回来后,升级了xcode,怎么弄都不行了。。
求大牛指点。。
代码
viewcontroller.h
se//
// ViewController.h
// test
//
// Created by xxx on 12-9-19.
// Copyright (c) 2012年 xxx. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *lz_web;
@property (weak, nonatomic) IBOutlet UIStepper *lz_jia;
@property (weak, nonatomic) IBOutlet UISlider *lz_hdt;
@property (weak, nonatomic) IBOutlet UIImageView *lz_image;
@property (weak, nonatomic) IBOutlet UITextField *lz_textbox;
@property (weak, nonatomic) IBOutlet UILabel *lz_label;
@property (weak, nonatomic) IBOutlet UIButton *lz_button;
-(IBAction)helloworld:(id)sender;
-(IBAction)hd:(id)sender;
@end
//
// ViewController.m
// test
//
// Created by xxx on 12-9-19.
// Copyright (c) 2012年 xxx. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize lz_web;
@synthesize lz_jia;
@synthesize lz_hdt;
@synthesize lz_image;
@synthesize lz_textbox;
@synthesize lz_label;
@synthesize lz_button;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[self setLz_button:nil];
[self setLz_label:nil];
[self setLz_textbox:nil];
[self setLz_image:nil];
[self setLz_hdt:nil];
[self setLz_jia:nil];
[self setLz_web:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
}
-(IBAction)helloworld:(id)sender
{
lz_web.userInteractionEnabled = true;
// navigate to google
[lz_web loadRequest:[[NSURLRequest alloc] initWithURL:[[NSURL alloc] initWithString:@"http://www.google.com"]]];
lz_label.text=@"ccc";
}
-(IBAction)hd:(id)sender
{
lz_image.alpha=lz_hdt.value;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@end
不知道是不是语法,还是什么变了,谢谢。
------最佳解决方案--------------------
推荐你使用phonegap,关于能不能通过审核,这和是不是web应用无关
具体见这篇文章 PhoneGap应用开发对策:如何通过苹果审核?
------其他解决方案--------------------