www.un.org/Depts/DGACM/index_spanish.htm UPDATE - Cause found! 请读到下文和增编;建议解决办法:
在制作录像以显示这一问题的同时,我发现为什么会发生这种情况。
<代码>#imports &@implementation DetailViewController
在.m
上定义的任何控制/要素,均由原始密码丢失。 VC 创立了一个新案例。
Example:
I am including a video that re-creates this issue. As shown, all controls work except a UISegmentedControl
& a UILabel
.. both of which are defined in DetailViewController.m
as:
#import "DetailViewController.h"
UISegmentedControl *sortcontrol;
UILabel *incrementLabel;
@implementation DetailViewController
我认为我们相当接近。 放弃答案!
P.S.(以英语发言):我认为这一信息足以使我们找到解决办法,但如果需要,我也可以分享这一守则。
EARLIER:
There s a detailViewController (detVC) in our app which is normally pushed from a UITableViewController.
现在,我们也正在执行普什通知,在通知送达时,这些通知将以示范方式提出同样的标准,而这反过来又可能针对任何观点控制者。
在通过通知提交《刑法》之前,法庭进行所有罚款,而另一个《刑法》案则已经是执意的管制人(通过表文提早)。
问题发生时,所介绍的VC被解职——被推倒的VC松散地控制了所有东西——并没有提及早先和安放过的数据;甚至还有<代码>。 UISegmentedControl on Navigation Toolbar Point to -1
index on press any index!
当我们制造一个单独的诽谤事件时,为什么会发生这样的事情。 VC? 为什么会影响较早的《刑法》? 这里需要了解目标C如何解决? (FYI,我们正在该项目中使用非洲资源中心)
增 编
EDIT - 一些法典:
shed:
ProductDetailViewController *detailViewController = [[ProductDetailViewController alloc] init];
detailViewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:detailViewController animated:YES];
detailViewController.serverOffset=serverOffset;
detailViewController.prdctIndex = indexPath.row;
通过通知提交:
- (void)displaySingleProduct:(NSDictionary*)userInfo{
ProductDetailViewController *onePrdVC = [[ProductDetailViewController alloc] init];
UINavigationController *addNav = [[UINavigationController alloc] initWithRootViewController:onePrdVC];
onePrdVC.justOne=YES;
onePrdVC.onePrdIDtoLoad=[[[userInfo valueForKey:@"prd"] valueForKey:@"id"] intValue];
[self.navigationController presentModalViewController:addNav animated:YES];
}
There is a Product
class in detVC which gets the data from the values stored at the prdctIndex row in the SQLite table.
After dismissing the presented detVC through notification, the Product
class of the pushed detVC starts pointing to the row which was used for Product
class in presented detVC. And there is no such code in viewDidAppear
which would alter Product
class.
因此,以上和安普文提到的“IDSegmentedControl问题;其他一些问题正在造成痛苦! 基本上,整个排雷中心的行为是 we的,如果我们只是pop忙,则重新开展工作!
EDIT 2
I have more info on it which could lead to the cause.
If I run viewDidLoad
on viewDidAppear
like this:
if (!justOne) {
aProduct = [allProducts getProduct:(prdctIndex+1) one:NO];
[self viewDidLoad];
[self populateDetails];
}
the pushed detVC regains the control & every element/control starts re-working as expected (but not in the ideal way). So, it is quite clear that the separate instance of presented detVC does messes up the earlier pushed detVC & a re-setting up of all the controls / pointers is required through viewDidLoad
.
能否从这一角度得出任何有益的结论?