Ios5 [PointInfoController endAppearanceTransition]:发送到已解除分配实例0x74d5e90的消息
我在这里需要一些帮助,我已经通过模态加载了一个视图,基本上我现在正试图忽略这个视图,但是在视图消失后它一直崩溃 它显示*-[PointInfoController endAppearanceTransition]:发送到释放实例0x74d5e90的消息 下面是.H文件:Ios5 [PointInfoController endAppearanceTransition]:发送到已解除分配实例0x74d5e90的消息,ios5,view,xcode4.2,presentmodalviewcontroller,dismiss,Ios5,View,Xcode4.2,Presentmodalviewcontroller,Dismiss,我在这里需要一些帮助,我已经通过模态加载了一个视图,基本上我现在正试图忽略这个视图,但是在视图消失后它一直崩溃 它显示*-[PointInfoController endAppearanceTransition]:发送到释放实例0x74d5e90的消息 下面是.H文件: 我对这一切都不熟悉,我花了好几天时间研究同一个问题。除了我自己,一切都怪我!我发现我无意中释放了所提到的实例。在我的例子中,我已经将该实例放入SSLConnectionRef中,并将其释放。我不知道为什么在查看代码时会出现问题。
我对这一切都不熟悉,我花了好几天时间研究同一个问题。除了我自己,一切都怪我!我发现我无意中释放了所提到的实例。在我的例子中,我已经将该实例放入SSLConnectionRef中,并将其释放。我不知道为什么在查看代码时会出现问题。无论如何,我认为您的编译器会抱怨您的[instance release]方法,因为这些方法不再被允许。出现问题是因为您和系统都在释放实例。你需要摆脱你的释放,一切都会好起来的
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@class PointInfoController;
@protocol PointInfoDelegate
- (void)PointInfoDidFinish:(PointInfoController*)PointInfoController;
@end
@interface PointInfoController : UIViewController <UIScrollViewDelegate>
{
IBOutlet UIScrollView *scrollView;
IBOutlet UIImageView *thumbnailView;
IBOutlet UIButton *Dismiss;
id<PointInfoDelegate> delegate;
}
@property (retain) id<PointInfoDelegate> delegate;
@property (retain, nonatomic) IBOutlet UITextView *description;
@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;
@property (retain, nonatomic) IBOutlet UIImageView *thumbnailView;
- (IBAction)DismissView:(id)sender;
@end
#import "PointInfoController.h"
#import "LockOnLocation.h"
@implementation UIScrollView (AutoContentSize)
- (void) setAutosizeContent:(BOOL)autosizeContent {
if (autosizeContent) {
CGFloat contentWidth =
self.frame.size.width == self.superview.frame.size.width ?
self.superview.frame.size.width :
self.frame.size.width + 10;
CGFloat contentHeight =
self.frame.size.height == self.superview.frame.size.height ?
self.superview.frame.size.height :
self.frame.size.height + 164;
self.contentSize = CGSizeMake(contentWidth, contentHeight);
}
}
@end
@implementation PointInfoController
@synthesize description;
@synthesize scrollView;
@synthesize thumbnailView;
@synthesize delegate;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView
{
}
*/
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
self.scrollView.delegate = self;
[super viewDidLoad];
}
- (void)viewDidUnload
{
[self setDescription:nil];
[scrollView release];
scrollView = nil;
[self setScrollView:nil];
[self setThumbnailView:nil];
[thumbnailView release];
thumbnailView = nil;
[Dismiss release];
Dismiss = nil;
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (IBAction)DismissView:(id)sender
{
[self dismissModalViewControllerAnimated:YES];
[self release];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (void)dealloc {
[description release];
[scrollView release];
[thumbnailView release];
[Dismiss release];
[super dealloc];
}
@end