how to direct the Facebook button to a certain view controller - objective-c

I have created a login button for my application, the login and the logout features work for the application. the problem i am having at the moment is that once the user has logged in to the application it only displays a logout button. i would like the application to direct the segue to my main view controller. [once the user logged in it displays this screen, i would like the user to be direct to the main home screen][1]
this is the main screen of the application, i would like the user to enter there login detail, once that has been a success i would like the user to be taken to this screen
the following code for the login screen and my app delegate
//
// AppDelegate.m
// SMAApplication
//
// Created by MOHAMMED Shakeel on 23/03/2016.
// Copyright © 2016 MOHAMMED Shakeel. All rights reserved.
//
#import "AppDelegate.h"
#import "AppDelegate.h"
#import "DetailViewController.h"
#import "Masterviewcontroller.h"
#import "data.h"
#import "FBSDKCoreKit/FBSDKCoreKit.h"
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#interface AppDelegate ()
#end
#implementation AppDelegate
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
// Override point for customization after application launch.
[data getallNotes];
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Saves changes in the application's managed object context before the application terminates.
[self saveContext];
}
#pragma mark - Core Data stack
#synthesize managedObjectContext = _managedObjectContext;
#synthesize managedObjectModel = _managedObjectModel;
#synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
- (NSURL *)applicationDocumentsDirectory {
// The directory the application uses to store the Core Data store file. This code uses a directory named "Shakeel.StudentManagementApplication" in the application's documents directory.
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
- (NSManagedObjectModel *)managedObjectModel {
// The managed object model for the application. It is a fatal error for the application not to be able to find and load its model.
if (_managedObjectModel != nil) {
return _managedObjectModel;
}
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:#"StudentManagementApplication" withExtension:#"momd"];
_managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return _managedObjectModel;
}
#import "LoginViewController.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import "FBSDKLoginKit/FBSDKLoginKit.h"
#interface LoginViewController ()
#end
#implementation LoginViewController
- (void)viewDidLoad {
[super viewDidLoad];
FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
loginButton.center = self.view.center;
[self.view addSubview:loginButton];
}
#pragma mark - Navigation
//In astoryboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
- (IBAction)login:(id)sender {
[self performSegueWithIdentifier:#"main" sender:self];
}
#end

You can use the delegate method of the FBSDKLoginButton - FBSDKLoginButtonDelegate.
-(void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error
{
[self performSegueWithIdentifier:#"Segueid"sender:self];
}
This method will get called on successful sign in via Facebook.

Related

How to fix "property implementation must have its declaration in interface 'Appdelegate'"

//
// AppDelegate.m
// Foody
//
// Created by Iceeiei on 5/2/15.
// Copyright (c) 2015 pondandfriend. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
#import "RecipeList.h"
#interface AppDelegate ()
#end
#implementation AppDelegate
#synthesize window = _window;
#synthesize viewController = _viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[ViewController alloc]initWithNibName:#"ViewController" bundle:nil];
RecipeList *recipeList = [[RecipeList alloc] initWithNibName:#"RecipeList" bundle:nil];
self.window.rootViewController = recipeList;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
#end
Error 1:
property implementation must have its declaration in interface 'Appdelegate'
Error 2:
Property'viewController' not found on object of type 'AppDelegate'
Is there any way to fix this?
It looks like you haven't added the #property notation for your ViewController in the .h. Add the following to AppDelegate.h:
#propery (nonatomic) ViewController *viewController;

Duplicate Declaration of Method 'ApplicationDidBecomeActive'

// Created by Robert Van Gilder on 30/05/2014.
// Copyright (c) 2014 Robert Van Gilder. All rights reserved.
//
#import "AppDelegate.h"
#import <FacebookSDK/FacebookSDK.h>
#import <Parse/Parse.h>
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[PFFacebookUtils initializeFacebook];
{[Parse setApplicationId:#"ycWShHVTsY7Xawt0dupTN1YMWFeyMLlhG7K9R0rZ"
clientKey:#"8AmzExUoqvmppa5k3eaS37RBNB6c1StmlysvvjBr"];}
{[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];}
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:#"MainStoryboard" bundle:nil];
UIViewController* initialViewController = [storyboard instantiateViewControllerWithIdentifier:#"MainViewController"];
self.window.rootViewController = initialViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [FBAppCall handleOpenURL:url
sourceApplication:sourceApplication
withSession:[PFFacebookUtils session]];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBAppCall handleDidBecomeActiveWithSession:[PFFacebookUtils session]];
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
#end
I get the error in the title at
- (void)applicationDidBecomeActive:(UIApplication *)application. I don't get why this happens. I'm using the Parse SDK along with the Facebook login, and I'm following Parse's instructions, however when I add this code part below, the compiler doesn't understand it properly and creates various errors.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [FBAppCall handleOpenURL:url
sourceApplication:sourceApplication
withSession:[PFFacebookUtils session]];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBAppCall handleDidBecomeActiveWithSession:[PFFacebookUtils session]];
}
You have a duplicate declaration of -applicationDidBecomeActive. The first one is indented incorrectly, just below -application:openURL:sourceApplication:annotation:. The second is between -applicationWillEnterForeground: and -applicationWillTerminate:.

Calling view controller method from appdelegate doesn't work when using Storyboard

Good day everyone,
I am not able to call the method refresh in my ViewController when using a Storyboad. However it works if I create the project without the Storyboard, just a NIB. Why it doesn't work and how to overcome this issue?
Here is my code:
AppDelegate.h
#import <UIKit/UIKit.h>
#class ViewController;
#interface AppDelegate : NSObject <UIApplicationDelegate>
{
UIWindow *window;
ViewController *viewController;
}
#property (nonatomic, retain) IBOutlet UIWindow *window;
#property (nonatomic, retain) IBOutlet ViewController *viewController;
#end
AppDelegate.m
#import "AppDelegate.h"
#import "ViewController.h"
#implementation AppDelegate
#synthesize window;
#synthesize viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
NSLog(#"app will enter foreground");
[viewController refresh:NULL];
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
#end
ViewController.h
#import <UIKit/UIKit.h>
#interface ViewController : UIViewController
-(IBAction) refresh:(id)sender;
#end
ViewController.m
#import "ViewController.h"
#interface ViewController ()
#end
#implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
- (void)loadData {
// contains information the ViewController makes use of
}
-(IBAction)refresh:(id) sender {
[self loadData];
}
#end
The viewController property in your app delegate are not populated when using a storyboard. Include the value in your log statement for confirmation - it will be null.
Register your view controller for the notification instead, and let it handle it's own refreshing.
In viewDidLoad:
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector(refresh:)
name:UIApplicationDidBecomeActiveNotification
object: nil];
You'll want to remove this observer in dealloc / viewDidUnload as well.

Xcode Interface Builder Not showing App Delegate Object

I am teaching myself Objective-C and iOS programming with "IOS Programming: The Big Nerd Ranch guide (2nd Edition) and I have run into an issue where the tutorial wants me to create connections to an App Delegate object, but this object does not appear in the Objects list in Interface builder for me. I am pretty sure its either a typo or perhaps a version different as the book is slightly behind my version of Xcode (4.2). I have included the code. I am fairly certain that the MOCAppDelegate object is what should be showing up in IB, but I am not yet familiar enough to know what code changes I need to make that happen. Specific question: How do I adjust the code below so that I get an object in the Objects list in IB so that I can perform the connections as instructed in the tutorial graphic?
Note: I researched and found this: Having trouble hooking up instance variables to AppDelegate but this solution did not work for me (or I did not implement it correctly)
Header File
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
#interface MOCAppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate>
{
CLLocationManager *locationManager;
IBOutlet MKMapView *worldView;
IBOutlet UIActivityIndicatorView *activityIndicator;
IBOutlet UITextField *locationTitleField;
}
#property (strong, nonatomic) IBOutlet UIWindow *window;
#end
Implementation File
#import "MOCAppDelegate.h"
#implementation MOCAppDelegate
#synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Create location manager object
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
//We want all results from the location manager
[locationManager setDistanceFilter:kCLDistanceFilterNone];
//And we want it to be as accurate as possible
//regardless of how much time/power it takes
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
//Tell our location manager to start looking for it location immediately
[locationManager startUpdatingLocation];
//We also want to know our heading
if (locationManager.headingAvailable == true) {
[locationManager startUpdatingHeading];
}
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor darkGrayColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
NSLog(#"%#", newLocation);
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateHeading:(CLHeading *)newHeading
{
NSLog(#"%#", newHeading);
}
- (void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSError *)error
{
NSLog(#"Could not find location: %#", error);
}
- (void)dealloc
{
if( [locationManager delegate] == self)
[locationManager setDelegate:nil];
}
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application
{
/*
Called when the application is about to terminate.
Save data if appropriate.
See also applicationDidEnterBackground:.
*/
}
#end
Drag an instance of NSObject into your .xib and drop it in the Objects section just as in the instructions you've got. Then select it and change its type in the identity inspector (on the right side, where it says "Custom Class") to "MOCAppDelegate" (or whatever class you like).
You should drag an "NSObject" from the Object Library onto your storyboard on the black bar underneath the view controller you want to connect. Then, click on the NSObject and in the identity inspector change the class to AppDelegate. Then you can create the connection to the AppDelegate.
MOCAppDelegate = AppDelegate
The code was generated for you when you named the project. The delegate of the UIApplication object is usually named slightly different depending on the name of the project.
(There's no doubt that any book in print was using an older Xcode.)
Select Files Owner and the Identity Inspector (command-alt-2) to confirm the file's owner is a place holder for the app delegate.

Change From a UIView to a UITableView

im a begginer Objective-c programmer and i stuck at this point. I Created an App from the View Template, then edited the view xib and add a button and assigned it to the showEdicoes function, but when i click it, it does execute the function(i tested with breakpoints) but it doesnt do anything, if i click again it gives an EXEC_BAD_ACESS
Codes:
bipViewController.h (the default one created by the template)
#import <UIKit/UIKit.h>
#import "edicoesVC.h";
#interface bipViewController : UIViewController {
edicoesVC *EdVC;
}
#property(nonatomic,retain)edicoesVC *EdVC;
- (IBAction) showEdicoes:(id)sender;
#end
bipViewController.m
#import "bipViewController.h"
#implementation bipViewController
#synthesize EdVC;
- (IBAction) showEdicoes:(id)sender {
edicoesVC *Edic = [[edicoesVC alloc] initWithNibName:#"edicoesVC" bundle:[NSBundle mainBundle]];
self.EdVC = Edic;
[Edic release];
[self.navigationController pushViewController:self.EdVC animated:YES];
[self.EdVC release];
}
.....
#end
edicoesVC.h and edicoesVC.m are the TableViewController to which i wan to change to.
i didnt changed anything on the appDelegate
what i missed?
Thanks i advance
EDIT: Additional code
bipAppDelegate.h
#import <UIKit/UIKit.h>
#class bipViewController;
#interface bipAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
bipViewController *viewController;
UINavigationController *navigationController;
}
#property (nonatomic, retain) IBOutlet UIWindow *window;
#property (nonatomic, retain) IBOutlet bipViewController *viewController;
#property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
#end
bipAppDelegate.m
#import "bipAppDelegate.h"
#import "bipViewController.h"
#implementation bipAppDelegate
#synthesize window;
#synthesize viewController;
#synthesize navigationController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
[self.window addSubview:viewController.view];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
/*
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application {
/*
Called when the application is about to terminate.
See also applicationDidEnterBackground:.
*/
}
#pragma mark -
#pragma mark Memory management
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
/*
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
*/
}
- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
}
#end
edicoesVC.h
#import <UIKit/UIKit.h>
#interface edicoesVC : UITableViewController {
}
#end
edicoes.m
#import "edicoesVC.h"
#implementation edicoesVC
#pragma mark -
#pragma mark View lifecycle
- (void)viewDidLoad {
[super viewDidLoad];
}
#pragma mark -
#pragma mark Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return 1;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...
if(indexPath.row == 0) {[cell setText:#"Janeiro 1918"];}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.row == 0)
{
}
}
#pragma mark -
#pragma mark Memory management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc. that aren't in use.
}
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
#end
I suspect the EXEC_BAD_ACCESS arises from the line:
[self.EdVC release];
This is because you have declared EdVC as (nonatomic, retain) in the header. This will perform a release followed by a retain when it is assigned a new value but you are performing an extra release. Take out the [self.EdVC release] line and move it to dealloc as:
[EdVC release];
Give this a try as it's the only thing I can think of, based on the code you've posted.
On the problem of nothing happening, I can't tell what's wrong from the code posted. Could you post the startup code of edicoesVC.h/edicoesVC.m?
You are using "self.EdVC" which is what I believe is causing your problem. When you access properties, just use the property name. For example:
[EdVC release];
One more thing, when coding in Objective-C classes are usually capitalized (i.e., BipViewController) and variables are lower case, i.e., eDic).