Search Results

Search found 13880 results on 556 pages for 'explicit interface'.

Page 11/556 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Default App Icon not appearing in iOS Simulator

    - by user577466
    I have searched quite a lot for an answer to this problem. If I have a general application, HelloWorld, and create an interface and then go to test it, then click on the Home button, not even the default grey/white icon is there like it's supposed to be. Anyone have any ideas why? I've even tried specifying a custom icon in the Info.plist file, but still nothing... I've got the latest version of Xcode and the SDK as well. (3.25 - 4.2)

    Read the article

  • UIViewController programmatically vs Interface Builder

    - by alexey
    I have a custom UIViewController and a corresponding view in a nib file. The view is added to the UIWindow directly. [window addSubview:customViewController.view]; Sizes of the window and the view are default (480x320 and 460x320 correspondingly). When I create CustomViewController inside the nib file and check "Resize View From NIB" in IB Attributes tab everything works just fine. But when I create CustomViewController programmmatically with initWithNibName message the view is not positioned on the window correctly. There is an empty stripe at the bottom. Its height is 20px. I see it's because of status bar offset. IB handles that with "Resize View From NIB". How to emulate that programmatically?

    Read the article

  • Image not showing in UIImageView in Interface Builder / iPhone

    - by dbonneville
    I have a UIView with an UIImageView dragged onto the view. All of a sudden, for all my xibs, the image no longer shows up. There is a blue X. However, when it builds, the image is there. At one point, I deleted and regenerated all my images and moved some into a subfolder in XCode. Normally, when you go to select an image for an UIImageView, IB allows you to pick from any image in the project. But, I can't see any of the images I had put in the folder anymore in the dropdown. All I see in the dropdown on the Inspector is the one image I want, but that is also the one that is not showing up. And like I said, if I build it on the device or simulator, it all works. There is some cache or something screwed up somewhere. Everything builds with no errors. I cleared the caches and rebuilt. It all works. No error or warnings. But...I can't see any other images and IB still thinks it's missing the image that is clearly selected in the dropdown. So how do I get XCode and IB back on track and see what assets it properly should be seeing in the XIBs?

    Read the article

  • Fluent interface design and code smell

    - by Jiho Han
    public class StepClause { public NamedStepClause Action1() {} public NamedStepClause Action2() {} } public class NamedStepClause : StepClause { public StepClause Step(string name) {} } Basically, I want to be able to do something like this: var workflow = new Workflow().Configure() .Action1() .Step("abc").Action2() .Action2() .Step("def").Action1(); So, some "steps" are named and some are not. The thing I do not like is that the StepClause has knowledge of its derived class NamedStepClause. I tried a couple of things to make this sit better with me. I tried to move things out to interfaces but then the problem just moved from the concrete to the interfaces - INamedStepClause still need to derive from IStepClause and IStepClause needs to return INamedStepClause to be able to call Step(). I could also make Step() part of a completely separate type. Then we do not have this problem and we'd have: var workflow = new Workflow().Configure() .Step().Action1() .Step("abc").Action2() .Step().Action2() .Step("def").Action1(); Which is ok but I'd like to make the step-naming optional if possible. I found this other post on SO here which looks interesting and promising. What are your opinions? I'd think the original solution is completely unacceptable or is it? By the way, those action methods will take predicates and functors and I don't think I want to take an additional parameter for naming the step there. The point of it all is, for me, is to only define these action methods in one place and one place only. So the solutions from the referenced link using generics and extension methods seem to be the best approaches so far.

    Read the article

  • How to get actual type of an derived class from its parent interface

    - by Tarik
    Hello people, Lets say we have a code portion like this : IProduct product = ProductCreator.CreateProduct(); //Factory Method we have here SellThisProduct(product); //... private void SellThisProduct(IProduct product) { //..do something here } //... internal class Soda : IProduct {} internal class Book : IProduct {} How can I infer which product is actually passed into SellThisProduct() method in the method? I think if I say GetType() or something it will probably return the IProduct type. Thanks...

    Read the article

  • Interface Builder: Resize View From NIB

    - by alexey
    I have a custom UIViewController and a corresponding view in a nib file. The view is added to the UIWindow directly. [window addSubview:customViewController.view]; Sizes of the window and the view are default (480x320 and 460x320 correspondingly). When I create CustomViewController inside the nib file and check "Resize View From NIB" in IB Attributes tab everything works just fine. But when I create CustomViewController programmmatically with initWithNibName message the view is not positioned on the window correctly. There is an empty stripe at the bottom. Its height is 20px. I see it's because of status bar offset. IB handles that with "Resize View From NIB". How to emulate that programmatically? It seems that IB uses some custom subclass of UIViewController. So the question: how is "Resize View From NIB" implemented there?

    Read the article

  • Can't change UITableViewCell size in Interface Builder

    - by Ondrej
    Does anyone have the same problem as I do? ... I've upgraded to the iPhone SDK 3.2 and I am unable to resize UITableViewCell object in my XIB file (usually I've been just resizing the view but now the cell has the same size and there is just a grey are around) ... btw, I've tried to reinstall twice including one deep reinstall.

    Read the article

  • How to change to a grouped table view in xcode without using Interface Builder

    - by Dave
    I have a table that I created within xcode so there is no nib file in this case. I want to make my table into the 'Grouped' style but im not sure how. I think it has somthing to do with the method below, the problem is Im not really sure how to call it, I do understand how methods work I'm just not too sure on where to start with this one: - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)UITableViewStyleGrouped So could someone tell me how to call it? The problem is that its not a method I wrote its a built in one so I could put that line into my header file but how would I use it in my implementation file? Thanks guys,

    Read the article

  • iPhone Orientation Relayout From Single Column to Double Column

    - by kkrizka
    I am trying to create a UIView in Interface Builder that shows to the user two boxes containing some text. This UIView should support both landscape and portrait modes. When in portrait orientation, the two boxes should be centered horizontally and be under each other. Like in the picture below: But when in landscape orientation, it should show the two boxes centered vertically and by side by side. Like in the picture below: Is this possible using only the autosizing options (or any other IB options), or do I have to relayout the view in code on orientation change events? I would prefer using only IB. I tried locking the top and left margins of the top box and locking the bottom and right margins of the bottom box. But the problem is that for it to work I also need to shrink the two boxes as one changes from portrait to landscape, because otherwise they would overlap.

    Read the article

  • iPhone SDK: Interface Builder label font, only shows when editing label

    - by Nic Hubbard
    I have tried this on a few installations of the 3.1.3 SDK. When I add a label to my view, I would like to change the font to something like Futura. I know how to change the font, but, for some reason, it does not show that it is changed. ONLY when I edit the label by double clicking, do I see my new font. And, this is the only time that I do get to see the new font, is when editing the label. Why does this happen? How can I change the font of my labels, and have it show up? Why would I care to have the font changed when I edit the label?!

    Read the article

  • Set an Interface Builder created element's state programatically

    - by mvexel
    I have a couple of UISwitch elements in a view controller that is presented modally in my iPhone app. I set up the view in IB. I want these UISwitch elements to reflect the current values in my [NSUserDefaults standardUserDefaults] where I store the appropriate BOOLs. I thought this would do the trick setting the switches to the right state, but no: -(void)viewWillAppear:(BOOL)animated { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [backgroundSwitch setOn:[defaults boolForKey:kTrackInBackgroundKey] animated:NO]; [batterySaveSwitch setOn:[defaults boolForKey:kBatterySaveKey] animated:NO]; } The backgroundSwitch and batterySaveSwitch are declared as properties for the view controller class. They are not initialized; that does not seem to make a difference. I did check the values coming out of the NSUserDefaults dictionary. The method is being called at the right time.

    Read the article

  • Align UItextFields one below the other in interface builder

    - by Dave
    How to align 2 textfields one below the other in a tool bar and display a button on the left side (or right side) in the vertical middle of those two fields? Please see the image to know what I am talking about. http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/mobilehig/art/ui_textfields.jpg

    Read the article

  • Interface Builder warnings

    - by Biranchi
    Hi all, I am getting an warning while building my source code as follows: /* com.apple.ibtool.document.warnings */ /Users/biranchi/Desktop/Hotlist v2.0/Classes/HLCheckinViewController.xib:6: warning: The separator style "Single Line Etched" is not supported on iPhone OS versions prior to 3.2. What is this error due to ? Thanks

    Read the article

  • method names with fluent interface

    - by deamon
    I have a Permissions class with methods in fluent style like this: somePermissions.setRead(true).setWrite(false).setExecute(true) The question is, whether I should name these methods set{Property} or only {property}. The latter would look like this: somePermissions.read(true).write(false).execute(true) If I look at these methods separately I would expect that read reads something, but on the other hand it is closer to the intention to have something like named paramaters like in Scala: Permission(read=true, write=false, execute=true)

    Read the article

  • seperating interface and implemention with normal functions

    - by ace
    this seems like it should be pretty simple, im probably leaving something simple out. this is the code im trying to run. it is 3 files, 2*cpp and 1*header. -------------lab6.h ifndef LAB6_H_INCLUDED define LAB6_H_INCLUDED int const arraySize = 10; int array1[arraySize]; int array2[arraySize]; void generateArray(int[], int ); void displayArray(int[], int[], int ); void reverseOrder(int [],int [], int); endif // LAB6_H_INCLUDED -----------------lab6.cpp include using std::cout; using std::endl; include using std::rand; using std::srand; include using std::time; include using std::setw; include "lab6.h" void generateArray(int array1[], int arraySize) { srand(time(0)); for (int i=0; i<10; i++) { array1[i]=(rand()%10); } } void displayArray(int array1[], int array2[], int arraySize) { cout<<endl<<"Array 1"<<endl; for (int i=0; i<arraySize; i++) { cout<<array1[i]<<", "; } cout<<endl<<"Array 2"<<endl; for (int i=0; i<arraySize; i++) { cout<<array2[i]<<", "; } } void reverseOrder(int array1[],int array2[], int arraySize) { for (int i=0, j=arraySize-1; i<arraySize;j--, i++) { array2[j] = array1[i]; } } ------------and finally main.cpp include "lab6.h" int main() { generateArray(array1, arraySize); reverseOrder(array1, array2, arraySize); displayArray(array1, array2, arraySize); return 0; }

    Read the article

  • Interface Builder caching bad data (voodoo)

    - by Ryan Townshend
    Sometimes IB will hold onto old or bad references, and I cannot seem to remove or edit them. EDIT I have made this a wiki question with the intention of gathering more data on the phenomenon. Answers involving situations where other coders have encountered this are welcome. This happened to me again last night with a table controller. When I created a spike project to try and reproduce the error, the system worked the way I anticipated. Then back in the actual project the bad behavior continued, even if I remove the xib file and all controllers involved. Creating a whole new project with none of the original (problematic) xib and nib files worked correctly. This question is not about the specifics of this incident but about this type of incident in IB. Does anyone know more about this type of bad IB behaviour, and possibly a more stylish way to to eliminate it than nuking the project? Note, removing the offending IB files and recreating them in the same project has not solved this for me in the past, only whole new projects. Answers regarding examples of when/how this glitch has been observed/created are welcome as well.

    Read the article

  • Interface builder background color => clear color ?

    - by jchatard
    I've setup some background colors for my Labels in order to position them. Now that they are well in place, I vould like to reset their background color to none, or clearColor. But I don't find any way to achieve this in IB, I don't gind any "no color" color... Any way to do this without re-coding color at runtime? Thanks, Jérémy

    Read the article

  • Looking for a virtual network adapter (virtual interface controller)

    - by Dawn
    I need a software that simulates a network adapter. I need the virtual adapters will be able to communicate with each other. For example, if I i have 2 virtual adapter (on the same computer): interface1-1.1.1.1 and interface2-1.1.1.2. I want the packets that will be send through interface1 will be received in interface2. I have as an option to install VMWare server, but i prefer something more specific. anyone have ideas?

    Read the article

  • Open-source generic web service to database interface?

    - by Joe Strout
    I'm looking for a thin, generic layer (probably written in PHP) that sits between a database (probably MySQL) and web service clients (which could be anything). I imagine there would be config files of some sort that tell it how to map web service requests to database queries (or other DB commands). It would also need to handle authentication and authorization, of course. I've done some googling but failed to find anything that fits the bill. Can anyone suggest something like this?

    Read the article

  • Delphi memory management design strategies : Object or Interface ?

    - by Pierre-Jean Coudert
    Regarding Delphi memory management, what are your design strategies ? What are the use cases where you prefer to create and release Objects manually ? What are the uses cases where Interfaces, InterfacedObjects, and their reference counting mechanism will be prefered ? Do you have identified some traps or difficulties with reference counted objects ? Thanks for sharing your experience here.

    Read the article

  • Interface Builder Does Not Recognize Toolbar Buttons

    - by Sheehan Alam
    I created 4 UIButton's that are Custom and Plain in IB. I added a background image to them and then placed them onto my UIToolbar. I created IBActions and hooked up all of the buttons I did not create @property for the buttons, but 3/4 of them appear on my toolbar and they work. Why isnt my 4th button appearing? If I need to declare an @property for them, will it be a UIToolbarButtonItem or a UIButton?

    Read the article

  • Invoke private method with interface as argument

    - by Stephanie
    Hi, I've been attempting to invoke a private method whose argument is a parameter and I can't quite seem to get it right. Here's kind of how the code looks so far: public class TestClass { public TestClass(){ } private void simpleMethod( Map<String, Integer> testMap) { //code logic } } Then I attempt to use this to invoke the private method: //Hashmap Map <String, Integer> testMap = new HashMap <String, Integer>(); //method I want to invoke Method simpleMethod = TestClass.class.getDeclaredMethod("simpleMethod", Map.class); simpleMethod.setAccessible(true); simpleMethod.invoke(testClassObject, testMap); //Throws an IllegalArgumentException As you can see, it throws an IllegalArgumentException. I've attempted to cast the hashmap back to a map, but that didn't work. What am I doing wrong?

    Read the article

  • How to get iPhone, not iPad view in Interface Builder

    - by dbonneville
    At first, I was not able to build a new blank project to iPhone using the new XCode 3.2 beta. I edited the project settings and was able to build the blank app to iPhone simulator. However, when I open the nib for the project in IB and click the view, it opens an iPad size view. How do I get the right sized view to work on in IB?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >