我有一个NSArray的NSDictionary.数组中的每个字典都有三个键:'Name','Sex'和'Age'
我如何才能找到索引NSArray的NSDictionary地方,例如,Name = 'Roger'?
我在这里发布之前已经搜索过我的最佳内容.下面是导致内存泄漏的代码.包括autorelease修复了内存泄漏,但我更感兴趣的是知道我在这里做错了什么.如果我拥有它,我应该释放它,这就是我想要做的事:)坦克提前帮助你.ContainerView是一个UIView,我正在添加我的欢迎文本.
UIImageView *welcomeText = [[UIImageView alloc] init];
welcomeText = [[UIImageView alloc] initWithFrame:CGRectZero];
welcomeText.frame = (CGRect) { CGRectGetMidX(containerView.frame) -295 , 100.0, 590,134 };
welcomeText.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth;
welcomeText.image = [UIImage imageNamed:@"welcome-to-the-jungle.png"];
[containerView addSubview:welcomeText];
[welcomeText release];
Run Code Online (Sandbox Code Playgroud)