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
3
votes
1 answer

Object animation - c4framework

I am currently working on a project that I built using the alpha C4 framework. I am trying to make start an animation as soon as the app launches without having to use an type of interaction to get it going (i.e. touchesBegan)... But unfortunately I…
M.Ermecheo
  • 87
  • 1
  • 8
3
votes
1 answer

Communication between objects - C4Framework

I'm working with the alpha release of C4 and I'm trying to send messages between objects but i cant make it work. Im trying with a really simple example but i cant make it work... I've tried this: [ashape listenFor:@"touch" from:anothershape…
davidpenuela
  • 51
  • 1
  • 9
3
votes
1 answer

Getting undeclared identifiers when creating subclassed C4Shapes (C4 Framework)

I’m making a program in C4 that consists of three separate buttons that change both their shape when pressed. When I create a bunch of methods for each button like this: @implementation MyButton -(void)methodA { C4Log(@"methodA"); [button1…
Jman078
  • 63
  • 3
3
votes
1 answer

C4Shape, setFrame doesn't change the size of the shape (C4Framework)

I'm playing around with C4, and can't seem to figure out why my shapes don't animate. If I create a shape like so: self.theShape = [C4Shape ellipse:CGRectMake(100, 100, 2, 2)]; ... and later call [theShape setFrame:CGRectMake(200, 200,…
jamesco
  • 83
  • 9
2
votes
1 answer

Loading an audio sample from the documents folder

I'm trying to have an app play audio files added via itunes file-sharing. I've managed the app to retrieve the app's sandbox folder's content, but I'm not able to load such files into a C4Sample by specifying the complete path. NSString…
jubl
  • 71
  • 4
2
votes
1 answer

C4Image Filters with a C4Movie

Quick question. I want to tint a movie dynamically in C4 is there a way I could use C4Image compatible temperatureAndTint with the texture ref of the C4Movie? Or could I build a transparent C4Image and tint it on top of the movie? I have tried both…
rakasis
  • 35
  • 4
2
votes
1 answer

Subclass of C4Shape is not becoming a line with instance method

I have created a subclass called Lines, that inherits from C4Shape. For now, all it does is create a random line when a class method is called. The intention is that every new line begins at the previous line's pointB (i.e. end point) in order to…
Saelyria
  • 142
  • 7
2
votes
1 answer

C4 cropping image some weird things happening

I thought this would be rather straight forward but it seems it's not. Things I have noticed when trying to crop an image like this: #import "C4Workspace.h" @implementation C4WorkSpace{ C4Image *image; C4Image *copiedImage; } -(void)setup…
suMi
  • 1,536
  • 1
  • 17
  • 30
2
votes
1 answer

C4 creating time stamp

I just started saving sceenshots of my current application. Instead of giving the screenshots names beforehand I'd like to use the current date+ time (something unique) as the filename. I found a method timeIntervalSince1970 in objective C but it…
suMi
  • 1,536
  • 1
  • 17
  • 30
2
votes
1 answer

[C4]conflict between pan recognizer and slider

I'm trying to pan and zoom into an image. As the pan-gesture isn't available in C4 yet, I thought I could go with a slider for the beginning. So I'm adding the pan-gesture to the photo like this: -(void)photoToCrop{ photoTaken=[C4Image…
suMi
  • 1,536
  • 1
  • 17
  • 30
2
votes
2 answers

image as button C4

I'm trying to add an action once an image was tapped. I first tried adding a C4Button and then giving it an image but that didn't work out at all. So now I'm trying to just add a tap function to an image here is the code -(void)setup{ //IMAGE AS…
suMi
  • 1,536
  • 1
  • 17
  • 30
2
votes
1 answer

How to attribute parameters to a subclass in C4

I'm trying to create a subclass object, whose size can be determined when I declare it. For example, do something near to "circle (int width, int height)", and in the C4WorkSpace, attribute two numbers that define the size of the circle. If I…
2
votes
1 answer

Moving Shapes to Random Points stored in an NSArray in C4

I'm trying to get a square to appear at one of the points in an array of points. I'm using 'Square.center = array[random integer]' to pick the point. I get the error "Assigning to 'CGPoint' (aka 'struct CGPoint') from incompatible type 'id'". I…
2
votes
1 answer

How do you adjust the kerning of a C4Label?

There doesn't seem to be a property to change the kerning. Is the best way to get the UILabel from C4Label and then go from there?
Adam Tindale
  • 1,239
  • 10
  • 26
2
votes
1 answer

C4Image filters all fade to white

I am going through the C4Image Class Reference and trying to play with the filters, but, for every filter I try, the image just fades to a white screen once it is applied. Here is a link to my project on GitHub. What am I doing wrong here?