How to render view (twig) using controller?

I’m trying to render a view using a callback;

$container['view'] = function($container) {
	$view = new \Slim\Views\Twig(
		['cache' => false]

	$view->addExtension(new Slim\Views\TwigExtension($container['router'], $container['request']->getUri()));
	return $view;

The route:

$app->get('/home', '\App\Http\Controller\Teste:main');

My class:

use Interop\Container\ContainerInterface;
use Slim\Views\Twig;

namespace App\Http\Controller;

class Teste
	public function main($request, $response, $args)
		return $this->view->render($response, 'index.twig');

The message:
Message: Call to a member function render() on null

How do i inject twig on my controller?

something like this

namespace App\Http\Controller;

use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;

class Teste
    private $c = null;

    public function __construct($container)
        $this->c = $container;

    public function main(Request $request, Response $response, $args)
        $this->c['logger']->info(__METHOD__ . ' action dispatched');

        $this->c['view']->render($response, 'Index.html.twig');

Also see the Slim-Bookshelf example app.

$app->get('/profile[/{user}]', function ($request, $response, $args) {
return $this->view->render($response, 'profile.twig');