Questions tagged [c4]

The C4 Framework for iOS is a creative-coding framework to create "works of art."

The C4 Framework (a.k.a Cocoa For Artists), promotes software literacy in design, research and the arts. It is an attempt to make iOS programming, the Cocoa API, and the programming language Objective-C more accessible. It's focus is on the artistic side of application development and the production of new kinds of computer-aided art practice.

For more information see the C4 Project About Page.

98 questions
2
votes
1 answer

How to work without a draw( ); loop in C4

So I'm coming from a bit of a processing background (albiet not much) where I'm used to working with a draw loop that runs over and over when the app is running. I can't seem to find something similar in xcode and C4. Is there anything like that…
BardiaD
  • 119
  • 1
  • 9
2
votes
1 answer

Linking stepper to Slider UIObject in C4

I am very new to C4 so please be gentle... If I want to link a slider value to a label this is done with NSString stringWithFormat... e.g.: self.mylabel.text = [NSString stringWithFormat:@"%4.2f",slider.value]; I added a stepper object as well, and…
Les Nyulak
  • 23
  • 2
2
votes
1 answer

Gesture controls crash when calling methods on C4WorkSpace.m

I'm working with the C4 framework on a project and I'm having a bit of trouble with using the gesture controls and calling methods from C4WorkSpace. I found this link that had to do with this problem but it didn't seem to stop my program from…
BardiaD
  • 119
  • 1
  • 9
2
votes
1 answer

creating classes C4

I'm trying to write a new class inside a C4-Libpd project. All I want to do is, aslong I want tot learn how to manage classes in Objective-C, getting the functionality from the "sequencial" code I've written into some more Object Oriented way. One…
2
votes
1 answer

Why have images lost their colour in this example code?

When I run the "Image Property" example, unmodified, the images have lost their colour (unlike in the video accompanying the example). Any idea what's going on? Update: I realized that it is only the included C4 images that have this problem…
2
votes
1 answer

How do i call a method from C4Workspace by using [object addGesture...]?

What I'm hoping to achieve is to call a method in C4Workspace.m by using: [shape addGesture:SWIPELEFT name:@"swipeLeft" action:@"leftSwipeMethod"]; I know that this attempts to call a method called "leftSwipeMethod" within the C4Shape class, but in…
Greg Debicki
  • 235
  • 2
  • 6
2
votes
1 answer

Changing the animationDuration after a couple lines of code

I'd like to do change animationDuration to 0 do something change animationDuration to something longer (1.0f for example) do something else ... all in the touchesBegan method without any "pauses" in between. But it seems that it wont let me do…
Greg Debicki
  • 235
  • 2
  • 6
2
votes
1 answer

How does masking work in C4?

I've set up a shape and an image that I'd like to mask my shape with. I set both their centers to the center of the canvas and then I wrote: shape.mask = img; But this gives me very strange results. The shape appears to be masked... sort of...…
Greg Debicki
  • 235
  • 2
  • 6
2
votes
2 answers

Get all touches on screen

I'm having a small issue. I'd like to receive all touches on the screen and for each one spawn a new video. The problem is that once a video is placed then it intercepts the touch points. I tried various values to go in locationInView but without…
Adam Tindale
  • 1,239
  • 10
  • 26
2
votes
1 answer

Does the zPosition property of a C4Shape take a moment to start working?

if I do zPosition = 3; and then right away I run a method that does string = [[NSString alloc]initWithFormat:@"%i", (NSInteger)shape.zPosition];' label.text = string;' then the label displays an incorrect value for the zPosition. however if I run…
Greg Debicki
  • 235
  • 2
  • 6
2
votes
1 answer

Why do the C4 github examples lack support for an iPad simulator?

I have recently downloaded the testScrollView and WalkCycle examples from https://github.com/C4Code, but the dropdown window in the topmost toolbar lacks the option to select iPad simulator as the target device. Do I have to have something enabled…
2
votes
2 answers

Is the Pinch gesture supported in C4?

I just downloaded C4 and am trying to get the pinch gesture going in some sample code where I already have the swipe gesture going. The code is as follows: [ball addGesture:SWIPERIGHT name:@"swipeR" action:@"swipeBall"]; [ball addGesture:PINCH…
Anand Agarawala
  • 121
  • 1
  • 3
2
votes
2 answers

Error When Compiling c4iOS app in XCODE

finally got reg'd as an iOS developer - tried to compile the app i wrote for the iPAD. app runs fine in simulator, it throws this error when compiling. here is the error ld: file is universal (2 slices) but does not contain a(n) armv7s slice:…
2
votes
1 answer

Integrating C4iOS with UIKit components and storyboard

Can C4iOS be used in a view? I want to use C4 in a view and integrate it with other UIKIT components. all templates and examples are using an special window and app delegate, so the c4 sketch takes all of window. Is it possible to display the sketch…
Abbas Mousavi
  • 486
  • 3
  • 17
2
votes
1 answer

How can I rotate a movie? [C4 Framework]

I am working with the C4 Alpha and I've added a small movie to the canvas but I don't know how to rotate it into the right position. Here's my code: -(void)setup { C4Movie *newMovie = [C4Movie movieNamed:@"IMG_0009.MOV"]; newMovie.center =…
Greg Debicki
  • 235
  • 2
  • 6